From 46b30504a541108bee4916094b9f5856ea78c002 Mon Sep 17 00:00:00 2001 From: iven Date: Mon, 18 May 2026 02:37:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(ai):=20Ollama=20Provider=20=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=E4=B8=8D=E6=94=AF=E6=8C=81=20Function=20Calling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/erp-ai/src/provider/ollama.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/erp-ai/src/provider/ollama.rs b/crates/erp-ai/src/provider/ollama.rs index bd7dd5b..0776278 100644 --- a/crates/erp-ai/src/provider/ollama.rs +++ b/crates/erp-ai/src/provider/ollama.rs @@ -300,6 +300,20 @@ impl AiProvider for OllamaProvider { Err(_) => Ok(false), } } + + async fn generate_with_tools( + &self, + _messages: Vec, + _tools: Vec, + _system_prompt: &str, + _model: &str, + _temperature: f32, + _max_tokens: u32, + ) -> AiResult { + Err(AiError::UnsupportedOperation( + "Ollama does not support Function Calling. Use Claude or OpenAI provider for Agent features.".into(), + )) + } } #[cfg(test)]