Skip to content
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

Using the built-in method to register a HttpClient in .NET for OllamaSharp #534

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aaronpowell
Copy link
Member

This means that we can leverage the configurations applied to HttpClient via ServiceDefault around stuff like resiliancy, rather than creating a HttpClient in isolation that is not aware of any of that configuration.

No new tests are added as there's not we could easily test with this, but all existing tests should continue to pass

Fixes #474

…Sharp

This means that we can leverage the configurations applied to HttpClient via ServiceDefault around stuff like resiliancy, rather than creating a HttpClient in isolation that is not aware of any of that configuration.

No new tests are added as there's not we could easily test with this, but all existing tests should continue to pass

Fixes #474
@aaronpowell aaronpowell requested a review from Copilot March 6, 2025 05:46
@aaronpowell
Copy link
Member Author

You'll be able to simplify your demos shortly @davidfowl 😉

@aaronpowell aaronpowell added this to the 9.3 milestone Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

github-actions bot commented Mar 6, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.EventStore 100% 100% 46
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 74
CommunityToolkit.Aspire.Hosting.ActiveMQ 80% 40% 100
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 22
CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps 100% 100% 28
CommunityToolkit.Aspire.Hosting.Bun 81% 71% 54
CommunityToolkit.Aspire.Hosting.Dapr 63% 49% 672
CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis 93% 71% 54
CommunityToolkit.Aspire.Hosting.DbGate 96% 50% 18
CommunityToolkit.Aspire.Hosting.Deno 84% 75% 72
CommunityToolkit.Aspire.Hosting.EventStore 94% 100% 18
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 93% 50% 18
CommunityToolkit.Aspire.Hosting.Golang 94% 50% 16
CommunityToolkit.Aspire.Hosting.Java 69% 72% 120
CommunityToolkit.Aspire.Hosting.LavinMQ 78% 50% 18
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.MailPit 91% 50% 14
CommunityToolkit.Aspire.Hosting.Meilisearch 73% 57% 50
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 96% 83% 36
CommunityToolkit.Aspire.Hosting.Ngrok 52% 35% 82
CommunityToolkit.Aspire.Hosting.NodeJS.Extensions 90% 69% 96
CommunityToolkit.Aspire.Hosting.Ollama 65% 66% 154
CommunityToolkit.Aspire.Hosting.PapercutSmtp 92% 50% 10
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 100% 91% 44
CommunityToolkit.Aspire.Hosting.Python.Extensions 68% 53% 86
CommunityToolkit.Aspire.Hosting.RavenDB 62% 44% 132
CommunityToolkit.Aspire.Hosting.Redis.Extensions 100% 83% 36
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 16
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 74% 62% 118
CommunityToolkit.Aspire.Hosting.Sqlite 97% 91% 54
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 100% 83% 36
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 30
CommunityToolkit.Aspire.Meilisearch 97% 92% 68
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 37% 27% 194
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 51% 50% 92
CommunityToolkit.Aspire.OllamaSharp 71% 64% 98
CommunityToolkit.Aspire.RavenDB.Client 60% 53% 237
Summary 72% (5150 / 7193) 59% (1449 / 2474) 3041

Minimum allowed line rate is 60%

@davidfowl
Copy link
Contributor

🥂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement resilience for OllamaSharp integration
2 participants