From 231fe31dab6a7a9ff8b650392bb5a0316fd18c5e Mon Sep 17 00:00:00 2001 From: Yufeng He <40085740+he-yufeng@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:42:08 +0800 Subject: [PATCH] fix: pass Ollama sample tools through options --- .../samples/02-agents/providers/ollama/ollama_chat_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/samples/02-agents/providers/ollama/ollama_chat_client.py b/python/samples/02-agents/providers/ollama/ollama_chat_client.py index adf2d3818e3..386506f3ce4 100644 --- a/python/samples/02-agents/providers/ollama/ollama_chat_client.py +++ b/python/samples/02-agents/providers/ollama/ollama_chat_client.py @@ -40,12 +40,12 @@ async def main() -> None: print(f"User: {message}") if stream: print("Assistant: ", end="") - async for chunk in client.get_response(messages, tools=get_time, stream=True): + async for chunk in client.get_response(messages, options={"tools": get_time}, stream=True): if str(chunk): print(str(chunk), end="") print("") else: - response = await client.get_response(messages, tools=get_time) + response = await client.get_response(messages, options={"tools": get_time}) print(f"Assistant: {response}")