Skip to content

Commit

Permalink
Add gpt-4o-mini to model list (microsoft#3169)
Browse files Browse the repository at this point in the history
* Add gpt-4o-mini to model list

* Fix formatting issue and verify with pre-commit

* Remove extra space

* Minor change to make pre-commit (formatting checks) pass

---------

Co-authored-by: Qingyun Wu <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: HRUSHIKESH DOKALA <[email protected]>
Co-authored-by: Ian <[email protected]>
  • Loading branch information
5 people authored Jul 27, 2024
1 parent d3c73e9 commit 33f29cb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions autogen/oai/openai_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
# gpt-4
"gpt-4": (0.03, 0.06),
"gpt-4-32k": (0.06, 0.12),
# gpt-4o-mini
"gpt-4o-mini": (0.000150, 0.000600),
"gpt-4o-mini-2024-07-18": (0.000150, 0.000600),
# gpt-3.5 turbo
"gpt-3.5-turbo": (0.0005, 0.0015), # default is 0125
"gpt-3.5-turbo-0125": (0.0005, 0.0015), # 16k
Expand Down
2 changes: 2 additions & 0 deletions autogen/token_count_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def get_max_token_limit(model: str = "gpt-3.5-turbo-0613") -> int:
"gpt-4-vision-preview": 128000,
"gpt-4o": 128000,
"gpt-4o-2024-05-13": 128000,
"gpt-4o-mini": 128000,
"gpt-4o-mini-2024-07-18": 128000,
}
return max_token_limit[model]

Expand Down
1 change: 1 addition & 0 deletions test/agentchat/contrib/test_gpt_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
filter_dict={
"api_type": ["openai"],
"model": [
"gpt-4o-mini",
"gpt-4o",
"gpt-4-turbo",
"gpt-4-turbo-preview",
Expand Down
8 changes: 7 additions & 1 deletion test/agentchat/test_conversable_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@

here = os.path.abspath(os.path.dirname(__file__))

gpt4_config_list = [{"model": "gpt-4"}, {"model": "gpt-4-turbo"}, {"model": "gpt-4-32k"}, {"model": "gpt-4o"}]
gpt4_config_list = [
{"model": "gpt-4"},
{"model": "gpt-4-turbo"},
{"model": "gpt-4-32k"},
{"model": "gpt-4o"},
{"model": "gpt-4o-mini"},
]


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion test/agentchat/test_function_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def test_update_function():
config_list_gpt4 = autogen.config_list_from_json(
OAI_CONFIG_LIST,
filter_dict={
"tags": ["gpt-4", "gpt-4-32k", "gpt-4o"],
"tags": ["gpt-4", "gpt-4-32k", "gpt-4o", "gpt-4o-mini"],
},
file_location=KEY_LOC,
)
Expand Down

0 comments on commit 33f29cb

Please sign in to comment.