Update HTTP client resilience handler configuration

Modified the `AddStandardResilienceHandler` method in
`Program.cs` to accept an `options` parameter. This allows
for setting a `TotalRequestTimeout` of 2 minutes, enhancing
the resilience handling of HTTP requests.
This commit is contained in:
Marco Minerva
2025-03-04 11:00:45 +01:00
parent 90b69f05d8
commit b37ad46605
+4 -1
View File
@@ -49,7 +49,10 @@ builder.Services.AddHybridCache(options =>
builder.Services.ConfigureHttpClientDefaults(builder => builder.Services.ConfigureHttpClientDefaults(builder =>
{ {
builder.AddStandardResilienceHandler(); builder.AddStandardResilienceHandler(options =>
{
options.TotalRequestTimeout.Timeout = TimeSpan.FromMinutes(2);
});
}); });
// Semantic Kernel is used to generate embeddings and to reformulate questions taking into account all the previous interactions, // Semantic Kernel is used to generate embeddings and to reformulate questions taking into account all the previous interactions,