diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/OpenAIModel.cs b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/OpenAIModel.cs index 103a1c522..2a3f7d37b 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/OpenAIModel.cs +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/OpenAIModel.cs @@ -214,7 +214,6 @@ public async Task CompletePromptAsync(ITurnContext turnContext, ChatCompletionOptions chatCompletionOptions = new() { - MaxOutputTokenCount = completion.MaxTokens, Temperature = (float)completion.Temperature, TopP = (float)completion.TopP, PresencePenalty = (float)completion.PresencePenalty, @@ -223,6 +222,7 @@ public async Task CompletePromptAsync(ITurnContext turnContext, if (isO1Model) { + chatCompletionOptions.MaxOutputTokenCount = completion.MaxTokens; chatCompletionOptions.Temperature = 1; chatCompletionOptions.TopP = 1; chatCompletionOptions.PresencePenalty = 0; diff --git a/dotnet/samples/04.ai.c.actionMapping.lightBot/Program.cs b/dotnet/samples/04.ai.c.actionMapping.lightBot/Program.cs index 1e5eba704..ceec38063 100644 --- a/dotnet/samples/04.ai.c.actionMapping.lightBot/Program.cs +++ b/dotnet/samples/04.ai.c.actionMapping.lightBot/Program.cs @@ -37,7 +37,8 @@ builder.Services.AddSingleton(sp => new( new OpenAIModelOptions(config.OpenAI.ApiKey, "gpt-4o") { - LogRequests = true + LogRequests = true, + Stream = true }, sp.GetService() ));