You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Can't use Open AI o1-preview model with ChatCompletionAgent because it fails with the following exception.
Microsoft.SemanticKernel.HttpOperationException: HTTP 400(invalid_request_error:unsupported_value)Microsoft.SemanticKernel.HttpOperationExceptionHTTP400(invalid_request_error:unsupported_value)Parameter:messages[0].role
Unsupported value: 'messages[0].role' does not support 'system' with this model.
To Reproduce
Steps to reproduce the behavior:
[Fact]publicasyncTaskThisFailsAndISad(){varinstructions="You are a cat. You're an expert meower.";varconfiguration=newConfigurationBuilder().AddUserSecrets<SamplePromptsIntegrationTests>().Build();varservices=newServiceCollection();services.AddLogging();varkernel=Kernel.CreateBuilder().AddOpenAIChatCompletion("o1-preview",configuration["OpenAI:APIKey"]!).Build();
#pragma warning disable SKEXP0110varagent=newChatCompletionAgent(){Kernel=kernel,Instructions=instructions};ChatHistorychat=[newChatMessageContent(AuthorRole.User,"Hello")];awaitforeach(ChatMessageContentresponseinagent.InvokeAsync(chat)){response.Content?.ToLowerInvariant().Should().Contain("meow");}
#pragma warning restore SKEXP0110}
github-actionsbot
changed the title
Bug: Chat Completion Agent with Open AI o1-preview is not working out of the box
.Net: Bug: Chat Completion Agent with Open AI o1-preview is not working out of the box
Jan 23, 2025
Describe the bug
Can't use Open AI
o1-preview
model withChatCompletionAgent
because it fails with the following exception.To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should just work. 🙃
Screenshots
Nah.
Platform
Additional context
Nerp.
The text was updated successfully, but these errors were encountered: