Pulse/internal/ai/providers
rcourtman bacf6b5fc9 feat: Add tool/function calling support to Ollama provider
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
2025-12-17 11:54:32 +00:00
..
anthropic.go feat(ui): make AI settings page more compact and user-friendly 2025-12-16 09:20:09 +00:00
anthropic_oauth.go feat(ui): make AI settings page more compact and user-friendly 2025-12-16 09:20:09 +00:00
anthropic_test.go Add comprehensive AI test coverage 2025-12-16 12:33:06 +00:00
factory.go feat: Implement multi-provider AI support 2025-12-11 16:00:45 +00:00
factory_test.go Add comprehensive AI test coverage 2025-12-16 12:33:06 +00:00
integration_test.go Add comprehensive AI test coverage 2025-12-16 12:33:06 +00:00
ollama.go feat: Add tool/function calling support to Ollama provider 2025-12-17 11:54:32 +00:00
ollama_test.go feat: Add tool/function calling support to Ollama provider 2025-12-17 11:54:32 +00:00
openai.go feat(ui): make AI settings page more compact and user-friendly 2025-12-16 09:20:09 +00:00
openai_test.go Add comprehensive AI test coverage 2025-12-16 12:33:06 +00:00
provider.go feat: Implement multi-provider AI support 2025-12-11 16:00:45 +00:00