feat(ai): Ollama Provider 声明不支持 Function Calling
This commit is contained in:
@@ -300,6 +300,20 @@ impl AiProvider for OllamaProvider {
|
|||||||
Err(_) => Ok(false),
|
Err(_) => Ok(false),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn generate_with_tools(
|
||||||
|
&self,
|
||||||
|
_messages: Vec<crate::dto::ChatMessage>,
|
||||||
|
_tools: Vec<crate::dto::ToolDefinition>,
|
||||||
|
_system_prompt: &str,
|
||||||
|
_model: &str,
|
||||||
|
_temperature: f32,
|
||||||
|
_max_tokens: u32,
|
||||||
|
) -> AiResult<crate::dto::AgentGenerateResponse> {
|
||||||
|
Err(AiError::UnsupportedOperation(
|
||||||
|
"Ollama does not support Function Calling. Use Claude or OpenAI provider for Agent features.".into(),
|
||||||
|
))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|||||||
Reference in New Issue
Block a user