-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Adds Supports for OpenAI Reasoning Models #3530
Conversation
Would love to test but don't have tier 5 API access :) can look through code. Note the current Beta Limitations:
A few questions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Looks clean and simple.
That's okay I really appreciate the feedback on the code :)
Good question. Hard to know what they will do. But I am open to different solutions. The reason I like this is because it modular and backwards compatible. If they make further upgrades, we can depreciate this client?
Good point, I was trying to first get the basic version working. Will add this.
You are correct. This was a typo. |
I think that works :)
Thanks!
Nice, all good :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left with a small question
super().__init__(OpenAI(**kwargs)) | ||
|
||
def create(self, params: Dict[str, Any]) -> ChatCompletion: | ||
print(params["messages"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the print statement required here ?
This PR is only enabling the o1 model for AutoGen 0.2, right? The counterpart for AutoGen 0.4 is this one #3884, right? (which I imagine is a bit more complicated to implement?) |
I believe for v0.4 support it should be as simple as allowing no system message in AssistantAgent. |
This pull request introduces support for a new set of models (
o1
ando1-mini
) in the OpenAI client.Task List
api_type
max_completion_tokens
New Client Support:
autogen/oai/client.py
: Added a new classOpenAI_O1
to handle theo1
models, including a method to modify the role of messages before processing. Updated the client registration logic to include the newOpenAI_O1
client. [1] [2]Model Configuration:
autogen/oai/openai_utils.py
: Added configuration foro1
ando1-mini
models, including their respective costs.autogen/token_count_utils.py
: Updated the token limit configurations to includeo1
ando1-mini
models.Testing:
test/twoagent-o1.py
: Added a new sample file to show the integration ofo1
models usingAssistantAgent
andUserProxyAgent
.Related: #3523
PS: I am going out for the evening; the new models feel slower for sure but return more detail responses. I bet the "system" prompts will need some tuning even though they aren't supported!