Skip to content

Add tool support to OllamaChatGenerator when streaming (or raise an error) #1882

Closed
@sjrl

Description

@sjrl
Contributor

Is your feature request related to a problem? Please describe.
I noticed in the OllamaChatGenerator that when streaming we ignore the tool_calls field of ollama.Message when collecting the chunks to eventually make the ChatMessage.

Describe the solution you'd like
We should either add support for it if possible or throw an error at init time and runtime if streaming + tools is requested like we do in the HuggingFaceAPIChatGenerator.

Activity

anakin87

anakin87 commented on Jun 3, 2025

@anakin87
Member

Ollama now supports streaming + tool calls: https://ollama.com/blog/streaming-tool.
Introduced in 0.8.0.

self-assigned this
on Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @sjrl@anakin87

    Issue actions

      Add tool support to OllamaChatGenerator when streaming (or raise an error) · Issue #1882 · deepset-ai/haystack-core-integrations