feat: 完成ai网关改造
This commit is contained in:
@@ -25,7 +25,10 @@ public class AzureChatService : IChatService
|
||||
new AzureKeyCredential(apiKey));
|
||||
ChatClient chatClient = azureClient.GetChatClient(deploymentName);
|
||||
|
||||
var response = chatClient.CompleteChatStreamingAsync(messages, cancellationToken: cancellationToken);
|
||||
var response = chatClient.CompleteChatStreamingAsync(messages, new ChatCompletionOptions()
|
||||
{
|
||||
MaxOutputTokenCount = 2048
|
||||
}, cancellationToken: cancellationToken);
|
||||
|
||||
await foreach (StreamingChatCompletionUpdate update in response)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user