Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partners/ollama: Enabled Token Level Streaming when Using Bind Tools for ChatOllama #27689

4 changes: 2 additions & 2 deletions libs/partners/ollama/langchain_ollama/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,10 @@ def _create_chat_stream(

params["options"]["stop"] = stop
if "tools" in kwargs:
yield self._client.chat(
yield from self._client.chat(
model=params["model"],
messages=ollama_messages,
stream=False,
stream=True,
options=Options(**params["options"]),
keep_alive=params["keep_alive"],
format=params["format"],
Expand Down
Loading