Skip to content

Commit

Permalink
Fixed model_type typos in RolePlaying (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
lightaime authored Jun 15, 2023
1 parent dbca94b commit 453bbed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions camel/agents/role_playing.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class RolePlaying:
agent. (default: :obj:`False`)
with_critic_in_the_loop (bool, optional): Whether to include a critic
in 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`)
Expand Down Expand Up @@ -75,7 +75,7 @@ def __init__(
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,
Expand All @@ -89,7 +89,7 @@ def __init__(
self.with_task_specify = with_task_specify
self.with_task_planner = with_task_planner
self.with_critic_in_the_loop = with_critic_in_the_loop
self.mode_type = mode_type
self.model_type = model_type
self.task_type = task_type

if with_task_specify:
Expand All @@ -102,7 +102,7 @@ def __init__(
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 {}),
)
Expand All @@ -116,7 +116,7 @@ def __init__(

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)
Expand Down Expand Up @@ -154,12 +154,12 @@ def __init__(

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 {}),
)

Expand All @@ -178,7 +178,7 @@ def __init__(
)
self.critic = CriticAgent(
self.critic_sys_msg,
mode_type,
model_type,
**(critic_kwargs or {}),
)
else:
Expand Down
4 changes: 2 additions & 2 deletions test/agents/test_role_playing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 False
assert role_playing.with_task_planner is False
assert 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_TURBO
assert role_playing.task_type == TaskType.AI_SOCIETY
assert role_playing.task_prompt == "Perform the task"
assert role_playing.specified_task_prompt is None
Expand Down

0 comments on commit 453bbed

Please sign in to comment.