Files
Giles Odigwe df0bd4da82 Python: Fix ollama_chat_client.py sample: pass tools via options dict (#6480)
* Fix ollama_chat_client.py sample: pass tools via options dict

The sample was passing tools as a direct keyword argument to
get_response(), which caused a TypeError. The tools parameter
must be passed inside the options dict per the SupportsChatGetResponse
protocol.

Fixes #6411

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Wrap tools in a list as expected by OllamaChatClient

_prepare_tools_for_ollama iterates the tools value, so it must be a
list rather than a bare FunctionTool instance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
df0bd4da82 ยท 2026-06-15 06:52:14 +00:00
History
..

Provider Samples Overview

This directory groups provider-specific samples for Agent Framework.

Folder What you will find
anthropic/ Anthropic Claude samples using both AnthropicClient and ClaudeAgent, including tools, MCP, sessions, and Foundry Anthropic integration.
amazon/ AWS Bedrock samples using BedrockChatClient, including tool-enabled agent usage.
azure/ Azure OpenAI chat completion samples using OpenAIChatCompletionClient, including basic usage, explicit configuration, tools, and sessions.
copilotstudio/ Microsoft Copilot Studio agent samples, including required environment/app registration setup and explicit authentication patterns.
custom/ Framework extensibility samples for building custom BaseAgent and BaseChatClient implementations, including layer-composition guidance.
foundry/ Microsoft Foundry and Foundry Local samples using FoundryChatClient, FoundryAgent, RawFoundryAgentChatClient, and FoundryLocalClient for hosted agents, Responses API, local inference, tools, MCP, and sessions.
github_copilot/ GitHubCopilotAgent samples showing basic usage, session handling, permission-scoped shell/file/url access, and MCP integration.
ollama/ Local Ollama samples using OllamaChatClient (recommended) plus OpenAI-compatible Ollama setup, including reasoning and multimodal examples.
openai/ OpenAI provider samples for Chat and Chat Completion clients, including tools, structured output, sessions, MCP, web search, and multimodal tasks.

Each folder has its own README with setup requirements and file-by-file details.