feat(ai): Ollama Provider 声明不支持 Function Calling

This commit is contained in:
iven
2026-05-18 02:37:12 +08:00
parent f42e3ba611
commit 46b30504a5

View File

@@ -300,6 +300,20 @@ impl AiProvider for OllamaProvider {
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)]