feat: 修改超时,改成10分钟

This commit is contained in:
chenchun
2025-07-01 16:11:41 +08:00
parent 69d8ff1034
commit 917857f1ff
3 changed files with 14 additions and 4 deletions

View File

@@ -23,12 +23,16 @@ public class AzureChatService : IChatService
AzureOpenAIClient azureClient = new(
endpoint,
new AzureKeyCredential(apiKey));
new AzureKeyCredential(apiKey), new AzureOpenAIClientOptions()
{
NetworkTimeout = TimeSpan.FromSeconds(600),
});
ChatClient chatClient = azureClient.GetChatClient(deploymentName);
var response = chatClient.CompleteChatStreamingAsync(messages, new ChatCompletionOptions()
{
// MaxOutputTokenCount = 2048
// MaxOutputTokenCount = 2048
}, cancellationToken: cancellationToken);
await foreach (StreamingChatCompletionUpdate update in response)