-
Notifications
You must be signed in to change notification settings - Fork 155
Update Ollama Microsoft.Extensions.AI integration documentation to use current recommended patterns #4145
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…mmended patterns Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot finished work on behalf of
IEvangelist
July 23, 2025 12:54
IEvangelist
approved these changes
Jul 23, 2025
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
gewarren
approved these changes
Jul 23, 2025
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
auto-merge was automatically disabled
July 23, 2025 15:42
Head branch was pushed to by a user without write access
Copilot finished work on behalf of
gewarren
July 23, 2025 15:43
gewarren
reviewed
Jul 23, 2025
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot finished work on behalf of
gewarren
July 23, 2025 15:50
…tation Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot finished work on behalf of
IEvangelist
July 24, 2025 16:16
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Microsoft.Extensions.AI integration section in the Ollama documentation was using deprecated methods that are no longer recommended in .NET Aspire 9.0. The image in the issue shows these deprecated methods:
This PR updates the documentation to use the current recommended patterns that are consistent with other .NET Aspire AI integrations (Azure OpenAI, Azure AI Inference).
Changes Made
AddOllamaSharpChatClient
examplesAddOllamaClientApi("llama").AddChatClient()
following the same pattern as Azure OpenAI integrationAddEmbeddingGenerator()
examples for complete Microsoft.Extensions.AI coverageNew Pattern
For chat clients:
For embedding generators:
For keyed services:
The updated documentation now follows the established pattern used across all .NET Aspire AI integrations and reflects the changes introduced in .NET Aspire Community Toolkit 9.0 with OllamaSharp 4.
Fixes #4131.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Internal previews