kernel-memory
kernel-memory copied to clipboard
[Question] how I can add ConfigureHttpClientDefaults for SK Retry logic?
Context / Scenario
I need retry logic for embedding requests, becse for 500 pages pdf I deffenelty will reach TooManyRequest issue, for Azure ADA2 model.
Question
in SK I can do like this:
semanticKernalBuilder.Services.ConfigureHttpClientDefaults(c =>
{
// Use a standard resiliency policy, augmented to retry on 401 Unauthorized for this example
c.AddStandardResilienceHandler().Configure(o =>
{
o.Retry.ShouldHandle = args => ValueTask.FromResult(args.Outcome.Result?.StatusCode is HttpStatusCode.Unauthorized);
});
});
how can I do this for KM?