🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
Fixed `model_type` typos in `RolePlaying` (#166)
Guohao Li453bbedf0b6f
diff --git a/camel/agents/role_playing.py b/camel/agents/role_playing.pyindex c144dc872..f773aff7a 100644--- a/camel/agents/role_playing.py+++ b/camel/agents/role_playing.py@@ -43,7 +43,7 @@ class RolePlaying:agent. (default: :obj:`False`)with_critic_in_the_loop (bool, optional): Whether to include a criticin the loop. (default: :obj:`False`)- mode_type (ModelType, optional): The type of GPT model to use.+ model_type (ModelType, optional): The type of backend model to use.(default: :obj:`ModelType.GPT_3_5_TURBO`)task_type (TaskType, optional): The type of task to perform.(default: :obj:`TaskType.AI_SOCIETY`)@@ -75,7 +75,7 @@ class RolePlaying:with_task_planner: bool = False,with_critic_in_the_loop: bool = False,critic_criteria: Optional[str] = None,- mode_type: ModelType = ModelType.GPT_3_5_TURBO,+ model_type: ModelType = ModelType.GPT_3_5_TURBO,task_type: TaskType = TaskType.AI_SOCIETY,assistant_agent_kwargs: Optional[Dict] = None,user_agent_kwargs: Optional[Dict] = None,@@ -89,7 +89,7 @@ class RolePlaying:self.with_task_specify = with_task_specifyself.with_task_planner = with_task_plannerself.with_critic_in_the_loop = with_critic_in_the_loop- self.mode_type = mode_type+ self.model_type = model_typeself.task_type = task_typeif with_task_specify:@@ -102,7 +102,7 @@ class RolePlaying:task_specify_meta_dict.update(extend_task_specify_meta_dict)task_specify_agent = TaskSpecifyAgent(- self.mode_type,+ self.model_type,task_type=self.task_type,**(task_specify_agent_kwargs or {}),)@@ -116,7 +116,7 @@ class RolePlaying:if with_task_planner:task_planner_agent = TaskPlannerAgent(- self.mode_type,+ self.model_type,**(task_planner_agent_kwargs or {}),)self.planned_task_prompt = task_planner_agent.step(task_prompt)@@ -154,12 +154,12 @@ class RolePlaying:self.assistant_agent: ChatAgent = ChatAgent(self.assistant_sys_msg,- mode_type,+ model_type,**(assistant_agent_kwargs or {}),)self.user_agent: ChatAgent = ChatAgent(self.user_sys_msg,- mode_type,+ model_type,**(user_agent_kwargs or {}),)@@ -178,7 +178,7 @@ class RolePlaying:)self.critic = CriticAgent(self.critic_sys_msg,- mode_type,+ model_type,**(critic_kwargs or {}),)else:diff --git a/test/agents/test_role_playing.py b/test/agents/test_role_playing.pyindex 75ffa323c..521721de7 100644--- a/test/agents/test_role_playing.py+++ b/test/agents/test_role_playing.py@@ -28,13 +28,13 @@ def test_role_playing_init():with_task_specify=False,with_task_planner=False,with_critic_in_the_loop=False,- mode_type=ModelType.GPT_3_5_TURBO,+ model_type=ModelType.GPT_3_5_TURBO,task_type=TaskType.AI_SOCIETY,)assert role_playing.with_task_specify is Falseassert role_playing.with_task_planner is Falseassert role_playing.with_critic_in_the_loop is False- assert role_playing.mode_type == ModelType.GPT_3_5_TURBO+ assert role_playing.model_type == ModelType.GPT_3_5_TURBOassert role_playing.task_type == TaskType.AI_SOCIETYassert role_playing.task_prompt == "Perform the task"assert role_playing.specified_task_prompt is None