-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: Feat/Add DEVELOPER role for openai o1 #10033
base: main
Are you sure you want to change the base?
Python: Feat/Add DEVELOPER role for openai o1 #10033
Conversation
…de of _inner_get_streaming_chat_message_contents has been removed.
…atCompletionBase.
Thanks for having a look at this, @ymuichiro. I think it’d be good to make sure other o1 api features are in as well. I saw they have a reasoning_effort param, too. Are there other features we’d want to get in to make sure the o1 experience works well? |
Thank you for checking this so quickly. Regarding o1, here are the changes I’m aware of: ※ It might be worth considering providing o1: 2024-12-17
{
"completion_tokens": 1843,
"prompt_tokens": 20,
"total_tokens": 1863,
"completion_tokens_details": {
"audio_tokens": null,
"reasoning_tokens": 448
},
"prompt_tokens_details": {
"audio_tokens": null,
"cached_tokens": 0
}
} Currently Unsupported • Parallel tool invocation It would be nice if these were applied to settings, usage, and author_role. |
I agree @moonbox3 bit more work is needed to make sure we fully support o1, these extra settings can just be added with None defaults, but we also need to consider the rendered prompt to ChatHistory parser, that uses a system message as default, that can be left as is, but might throw when used with o1 but might also be usefull to have a look at how we can support this as well! |
Thank you for your comment. After reviewing the current Semantic Kernel code, I found several instances where With that in mind, I am planning to proceed with the following tasks. Does this approach make sense to you?
※ Most methods can be reused, so it might be sufficient to simply override some methods of the existing
Regarding item 2, even if certain properties cannot be used, I believe it is the responsibility of the user to ensure only valid properties are passed. Therefore, I plan to set the default values for these properties to Furthermore, regarding the new response property |
Motivation and Context
Currently, the OpenAI O1 model introduces a new role "developer". However, passing the conventional "system" role results in an error. To address this issue, the following changes are proposed.
Description
Add a Method to the
ChatHistory
ClassExpand the
AuthorRole
Enum"developer"
as a new value to theAuthorRole
enum.Improve Developer Experience (UX)
"system"
role is mistakenly passed, the logic should internally convert it to"developer"
for better UX."system"
, simply adding support for the"developer"
role seems to be the most optimal solution at this point.Background
"system"
role, causing errors when it is passed."developer"
role must be integrated in a way that preserves compatibility with other models.Usage
Contribution Checklist