Skip to content
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

Add gpt-4o-mini to model list #3169

Merged
merged 14 commits into from
Jul 27, 2024
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
Loading