From 1d27b5767242127bcfad59d82b5fe6139f9ab933 Mon Sep 17 00:00:00 2001 From: Giles Odigwe <79032838+giles17@users.noreply.github.com> Date: Tue, 7 Oct 2025 09:14:34 -0700 Subject: [PATCH] Python: ollama + azureai openapi samples fix (#1244) * ollama + azureai openapi samples fix * small fix --- .../packages/azure-ai/agent_framework_azure_ai/_chat_client.py | 2 ++ .../agents/ollama/ollama_with_openai_chat_client.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py b/python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py index 2f0cfc70ef..6b27a4224a 100644 --- a/python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py +++ b/python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py @@ -898,6 +898,8 @@ class AzureAIAgentClient(BaseChatClient): filter=additional_props.get("filter", ""), ) tool_definitions.extend(ai_search.definitions) + case ToolDefinition(): + tool_definitions.append(tool) case dict(): tool_definitions.append(tool) case _: diff --git a/python/samples/getting_started/agents/ollama/ollama_with_openai_chat_client.py b/python/samples/getting_started/agents/ollama/ollama_with_openai_chat_client.py index 8033b54dc9..f9b1e79be7 100644 --- a/python/samples/getting_started/agents/ollama/ollama_with_openai_chat_client.py +++ b/python/samples/getting_started/agents/ollama/ollama_with_openai_chat_client.py @@ -44,7 +44,7 @@ async def non_streaming_example() -> None: query = "What's the weather like in Seattle?" print(f"User: {query}") result = await agent.run(query) - print(f"Result: {result}\n") + print(f"Agent: {result}\n") async def streaming_example() -> None: