Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

Update `ModelType` and remove legacy models (#511)

Guohao Lie4e26df768f2
diff --git a/camel/types/enums.py b/camel/types/enums.py
index 90335c994..2221c07bf 100644
--- a/camel/types/enums.py
+++ b/camel/types/enums.py
@@ -24,12 +24,11 @@ class RoleType(Enum):
class ModelType(Enum):
- GPT_3_5_TURBO = "gpt-3.5-turbo-1106"
- GPT_3_5_TURBO_16K = "gpt-3.5-turbo-1106"
+ GPT_3_5_TURBO = "gpt-3.5-turbo"
GPT_4 = "gpt-4"
GPT_4_32K = "gpt-4-32k"
- GPT_4_TURBO = "gpt-4-1106-preview"
- GPT_4_TURBO_VISION = "gpt-4-vision-preview"
+ GPT_4_TURBO = "gpt-4-turbo"
+ GPT_4_TURBO_VISION = "gpt-4-turbo"
STUB = "stub"
@@ -57,7 +56,6 @@ class ModelType(Enum):
r"""Returns whether this type of models is an OpenAI-released model."""
return self in {
ModelType.GPT_3_5_TURBO,
- ModelType.GPT_3_5_TURBO_16K,
ModelType.GPT_4,
ModelType.GPT_4_32K,
ModelType.GPT_4_TURBO,
@@ -97,8 +95,6 @@ class ModelType(Enum):
"""
if self is ModelType.GPT_3_5_TURBO:
return 16385
- elif self is ModelType.GPT_3_5_TURBO_16K:
- return 16385
elif self is ModelType.GPT_4:
return 8192
elif self is ModelType.GPT_4_32K:
diff --git a/test/agents/test_role_playing.py b/test/agents/test_role_playing.py
index ef1412d3e..eef5f141b 100644
--- a/test/agents/test_role_playing.py
+++ b/test/agents/test_role_playing.py
@@ -29,9 +29,9 @@ def test_role_playing_init(model_type, critic_role_name,
with_critic_in_the_loop):
role_playing = RolePlaying(
assistant_role_name="assistant",
- assistant_agent_kwargs=dict(model_type=ModelType.GPT_3_5_TURBO_16K),
+ assistant_agent_kwargs=dict(model_type=ModelType.GPT_3_5_TURBO),
user_role_name="user",
- user_agent_kwargs=dict(model_type=ModelType.GPT_3_5_TURBO_16K),
+ user_agent_kwargs=dict(model_type=ModelType.GPT_3_5_TURBO),
model_type=model_type,
critic_role_name=critic_role_name,
task_prompt="Perform the task",
@@ -62,8 +62,8 @@ def test_role_playing_init(model_type, critic_role_name,
assert isinstance(assistant_agent, ChatAgent)
assert isinstance(user_agent, ChatAgent)
if model_type is None:
- assert assistant_agent.model_type == ModelType.GPT_3_5_TURBO_16K
- assert user_agent.model_type == ModelType.GPT_3_5_TURBO_16K
+ assert assistant_agent.model_type == ModelType.GPT_3_5_TURBO
+ assert user_agent.model_type == ModelType.GPT_3_5_TURBO
else:
assert assistant_agent.model_type == ModelType.GPT_4
assert user_agent.model_type == ModelType.GPT_4
diff --git a/test/models/test_openai_model.py b/test/models/test_openai_model.py
index fdd48f5e6..9f565dc5a 100644
--- a/test/models/test_openai_model.py
+++ b/test/models/test_openai_model.py
@@ -24,7 +24,6 @@ from camel.utils import OpenAITokenCounter
@pytest.mark.model_backend
@pytest.mark.parametrize("model_type", [
ModelType.GPT_3_5_TURBO,
- ModelType.GPT_3_5_TURBO_16K,
ModelType.GPT_4,
ModelType.GPT_4_32K,
ModelType.GPT_4_TURBO,