mirror of
https://github.com/microsoft/autogen.git
synced 2026-01-08 21:28:40 +00:00
Update Program.cs
add more http retries
This commit is contained in:
parent
fdd4422a32
commit
a8cc580fa3
@ -31,7 +31,18 @@ class Program
|
||||
.WithLogger(loggerFactory.CreateLogger<IKernel>())
|
||||
.WithAzureChatCompletionService(kernelSettings.DeploymentOrModelId, kernelSettings.Endpoint, kernelSettings.ApiKey, true, kernelSettings.ServiceId, true)
|
||||
.WithMemory(semanticTextMemory)
|
||||
.WithConfiguration(kernelConfig).Build();
|
||||
.WithConfiguration(kernelConfig)
|
||||
.Configure(c => c.SetDefaultHttpRetryConfig(new HttpRetryConfig
|
||||
{
|
||||
MaxRetryCount = 6,
|
||||
UseExponentialBackoff = true,
|
||||
// MinRetryDelay = TimeSpan.FromSeconds(2),
|
||||
// MaxRetryDelay = TimeSpan.FromSeconds(8),
|
||||
// MaxTotalRetryTime = TimeSpan.FromSeconds(30),
|
||||
// RetryableStatusCodes = new[] { HttpStatusCode.TooManyRequests, HttpStatusCode.RequestTimeout },
|
||||
// RetryableExceptions = new[] { typeof(HttpRequestException) }
|
||||
}))
|
||||
.Build();
|
||||
|
||||
|
||||
var fileOption = new Option<FileInfo?>(
|
||||
@ -139,4 +150,4 @@ class Program
|
||||
|
||||
public static class PM { public static string Readme = "Readme"; public static string BootstrapProject = "BootstrapProject"; }
|
||||
public static class DevLead { public static string Plan="Plan"; }
|
||||
public static class Developer { public static string Implement="Implement"; }
|
||||
public static class Developer { public static string Implement="Implement"; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user