Skip to content

OpenAI o1 model support - #43

Open
marklysze wants to merge 7 commits into
mainfrom
openaio1
Open

OpenAI o1 model support#43
marklysze wants to merge 7 commits into
mainfrom
openaio1

Conversation

@marklysze

@marklysze marklysze commented Sep 13, 2024

Copy link
Copy Markdown
Collaborator

Why are these changes needed?

OpenAI has just released o1-mini and o1-preview, these changes add support for the model.

I don't have level 5 API access to test against the API, if anyone can test with the models that would be great.

Notes:

  • OpenAI is depreciating max_tokens and max_completion_tokens should be used. Code maps max_tokens to max_completion_tokens.
  • Beta limitations

Tests still TODO.

Related issue number

Checks

@BabyCNM BabyCNM left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I cannot test o1 yet because of limited access. However, the implementation looks great.

A lint question: should we rename "map_params" to "_map_params" for readability?

@BabyCNM BabyCNM left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'num_tokens' change and test updates are good to have.

Comment thread autogen/token_count_utils.py
Comment thread autogen/oai/client.py
Comment thread test/agentchat/test_function_call.py Outdated
Comment thread autogen/token_count_utils.py Outdated
Comment thread autogen/oai/client.py
@sonichi

sonichi commented Sep 29, 2024

Copy link
Copy Markdown
Collaborator

@marklysze could you check the build error? It indicates some problem with the token counting.

@yiranwu0

yiranwu0 commented Oct 1, 2024

Copy link
Copy Markdown
Collaborator

@marklysze could you check the build error? It indicates some problem with the token counting.

This should be related to the change in count_token function.

@marklysze

marklysze commented Oct 2, 2024

Copy link
Copy Markdown
Collaborator Author

@marklysze could you check the build error? It indicates some problem with the token counting.

This should be related to the change in count_token function.

All good, committing correction shortly

Update: committed

@sonichi

sonichi commented Oct 3, 2024

Copy link
Copy Markdown
Collaborator

@qingyun-wu could you make sure there's an o1 endpoint in the config list used by the openai CI?
@BabyCNM has your change request been addressed?

odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
odoochain pushed a commit to odoochain/autogen that referenced this pull request Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants