mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Tool calls are not properly returned when chat() is called with stream=True #141
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ggozad on GitHub (Sep 12, 2024).
Originally assigned to: @ParthSareen on GitHub.
I have been working on integrating Ollama tools with oterm.
When making a call to
AsyncClient.chat()withtoolsdefined andstream=Truethe response gives the tools to be called and params in thecontentattribute of the json response. For example:Same call with
stream=Falsehas, as it should, an emptycontentand the tools inside thetool_callsattribute.@cpsievert commented on GitHub (Sep 27, 2024):
I'm also experiencing this. And to add a bit more context, there is no information in the response chunks to indicate that a tool call was chosen
@petri commented on GitHub (Nov 24, 2024):
Related: https://github.com/ollama/ollama/issues/5796, "Streaming for tool calls is unsupported"
@ParthSareen commented on GitHub (Nov 26, 2024):
Coming soon!!! 🥳
@ParthSareen commented on GitHub (Nov 27, 2024):
Fixed! https://github.com/ollama/ollama/releases/tag/v0.4.6