Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
singhk97 committed Dec 5, 2024
1 parent ad65ed8 commit af694c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ public async Task<PromptResponse> CompletePromptAsync(ITurnContext turnContext,

ChatCompletionOptions chatCompletionOptions = new()
{
MaxOutputTokenCount = completion.MaxTokens,
Temperature = (float)completion.Temperature,
TopP = (float)completion.TopP,
PresencePenalty = (float)completion.PresencePenalty,
Expand All @@ -223,6 +222,7 @@ public async Task<PromptResponse> CompletePromptAsync(ITurnContext turnContext,

if (isO1Model)
{
chatCompletionOptions.MaxOutputTokenCount = completion.MaxTokens;
chatCompletionOptions.Temperature = 1;
chatCompletionOptions.TopP = 1;
chatCompletionOptions.PresencePenalty = 0;
Expand Down
3 changes: 2 additions & 1 deletion dotnet/samples/04.ai.c.actionMapping.lightBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
builder.Services.AddSingleton<OpenAIModel>(sp => new(
new OpenAIModelOptions(config.OpenAI.ApiKey, "gpt-4o")
{
LogRequests = true
LogRequests = true,
Stream = true
},
sp.GetService<ILoggerFactory>()
));
Expand Down

0 comments on commit af694c5

Please sign in to comment.