Skip to content

A programming framework for agentic AI

Update Program.cs

Ryan Sweeta8cc580fa39f
diff --git a/cli/Program.cs b/cli/Program.cs
index f6da1b116..4fa1f3cc6 100644
--- a/cli/Program.cs
+++ b/cli/Program.cs
@@ -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"; }
\ No newline at end of file
+public static class Developer { public static string Implement="Implement"; }