You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scope Ollama resilience settings to Web/Program.cs and restore ServiceDefaults (#6850)
Move Ollama-specific HTTP client resiliency configuration out of Extensions.cs in ServiceDefaults to an extension method called later in Web/Program.cs.
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/.template.config/template.json
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.ServiceDefaults/Extensions.cs
-13Lines changed: 0 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -29,21 +29,8 @@ public static TBuilder AddServiceDefaults<TBuilder>(this TBuilder builder) where
Copy file name to clipboardExpand all lines: src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/Program.Aspire.cs
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,13 @@
50
50
#endif
51
51
builder.Services.AddScoped<DataIngestor>();
52
52
builder.Services.AddSingleton<SemanticSearch>();
53
+
#if (IsOllama)
54
+
// Applies robust HTTP resilience settings for all HttpClients in the Web project,
55
+
// not across the entire solution. It's aimed at supporting Ollama scenarios due
56
+
// to its self-hosted nature and potentially slow responses.
57
+
// Remove this if you want to use the global or a different HTTP resilience policy instead.
Copy file name to clipboardExpand all lines: test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Snapshots/aichatweb.Ollama_Qdrant.verified/aichatweb/aichatweb.ServiceDefaults/Extensions.cs
+1-9Lines changed: 1 addition & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,7 @@ public static TBuilder AddServiceDefaults<TBuilder>(this TBuilder builder) where
Copy file name to clipboardExpand all lines: test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Snapshots/aichatweb.Ollama_Qdrant.verified/aichatweb/aichatweb.Web/Program.cs
0 commit comments