Fixes issue where Ollama users get 'I'm a large language model, I can't do XYZ' responses when trying to use the AI assistant. The problem was that the Ollama provider was not passing tool definitions to the API. Changes: - Add Tools field to ollamaRequest struct - Add ollamaTool, ollamaToolFunction, ollamaToolCall structs - Convert tools from ChatRequest to Ollama format in Chat() - Parse tool_calls from Ollama response - Set StopReason to 'tool_use' when model requests tool execution - Handle tool results in multi-turn conversations Requires Ollama v0.3.0+ and a tool-capable model (llama3.1+, mistral-nemo, etc.) Closes: Discussion #845 comment by misterlegend |
||
|---|---|---|
| .. | ||
| anthropic.go | ||
| anthropic_oauth.go | ||
| anthropic_test.go | ||
| factory.go | ||
| factory_test.go | ||
| integration_test.go | ||
| ollama.go | ||
| ollama_test.go | ||
| openai.go | ||
| openai_test.go | ||
| provider.go | ||