-
Notifications
You must be signed in to change notification settings - Fork 248
Python : Ollama Connector for Agent Framework #1104
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
base: main
Are you sure you want to change the base?
Python : Ollama Connector for Agent Framework #1104
Conversation
…led in a different pr
…nmoeller/agent-framework into features/python_olama_connector
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…nmoeller/agent-framework into features/python_olama_connector
Co-authored-by: Eduard van Valkenburg <[email protected]>
- Divided Streaming and Non-Streaming into independent Methods - Catch Ollama Validation Error - Add OTEL Provider Name - Checked Ollama Messages - Add Usage Statistics
…nmoeller/agent-framework into features/python_olama_connector
Python Test Coverage Report •
Python Unit Test Overview
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces Ollama integration for the Microsoft Agent Framework, enabling developers to use Ollama-based chat models within the framework. The implementation includes comprehensive support for chat completion, tool calling, reasoning capabilities, and multimodal input handling.
- Adds
agent-framework-ollama
package with full Ollama integration - Implements
OllamaChatClient
supporting streaming/non-streaming responses, tool calls, reasoning, and multimodal inputs - Extends core framework with
reasoning
property support across chat response types
Reviewed Changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
python/packages/ollama/agent_framework_ollama/_chat_client.py |
Core Ollama chat client implementation with message conversion and response handling |
python/packages/core/agent_framework/_types.py |
Adds reasoning property to ChatMessage, ChatResponse, and ChatResponseUpdate classes |
python/packages/ollama/pyproject.toml |
Package configuration for agent-framework-ollama with dependencies and build settings |
python/packages/ollama/tests/test_ollama_chat_client.py |
Comprehensive unit and integration tests for the Ollama chat client |
python/samples/getting_started/agents/ollama/ollama_agent_basic.py |
Sample demonstrating basic agent usage with tool calling |
python/samples/getting_started/agents/ollama/ollama_agent_reasoning.py |
Sample demonstrating reasoning capabilities |
python/samples/getting_started/multimodal_input/ollama_chat_multimodal.py |
Sample demonstrating multimodal image analysis |
python/samples/getting_started/chat_client/ollama_chat_client.py |
Sample demonstrating direct chat client usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
python/samples/getting_started/multimodal_input/ollama_chat_multimodal.py
Outdated
Show resolved
Hide resolved
…ltimodal.py Co-authored-by: Copilot <[email protected]>
…nmoeller/agent-framework into features/python_olama_connector
Motivation and Context
This pull request introduces a new Olama integration package for the Microsoft Agent Framework, allowing users to leverage Ollama-based chat models within the framework. The changes include the implementation of the
agent-framework-olama
package, its integration as an optional dependency, and the addition of a sample demonstrating its usage.Screenshot of Working Samples
Screenshot of test coverage
Description
Contribution Checklist