You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mintlify/reference/camel.societies.role_playing.mdx
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,8 @@ Role playing between two agents.
32
32
-**extend_task_specify_meta_dict** (Dict, optional): A dict to extend the task specify meta dict with. (default: :obj:`None`)
33
33
-**output_language** (str, optional): The language to be output by the agents. (default: :obj:`None`)
34
34
-**stop_event** (Optional[threading.Event], optional): Event to signal termination of the agent's operation. When set, the agent will terminate its execution. (default: :obj:`None`)
35
+
-**assistant_agent** (ChatAgent, optional): A pre-configured ChatAgent to use as the assistant. If provided, this will override the creation of a new assistant agent. (default: :obj:`None`)
36
+
-**user_agent** (ChatAgent, optional): A pre-configured ChatAgent to use as the user. If provided, this will override the creation of a new user agent. (default: :obj:`None`)
@@ -130,25 +132,29 @@ message, and a list of system message meta dicts.
130
132
```python
131
133
def_init_agents(
132
134
self,
133
-
init_assistant_sys_msg: BaseMessage,
134
-
init_user_sys_msg: BaseMessage,
135
+
init_assistant_sys_msg: Optional[BaseMessage],
136
+
init_user_sys_msg: Optional[BaseMessage],
135
137
assistant_agent_kwargs: Optional[Dict] =None,
136
138
user_agent_kwargs: Optional[Dict] =None,
137
139
output_language: Optional[str] =None,
138
-
stop_event: Optional[threading.Event] =None
140
+
stop_event: Optional[threading.Event] =None,
141
+
assistant_agent: Optional[ChatAgent] =None,
142
+
user_agent: Optional[ChatAgent] =None
139
143
):
140
144
```
141
145
142
146
Initialize assistant and user agents with their system messages.
143
147
144
148
**Parameters:**
145
149
146
-
-**init_assistant_sys_msg** (BaseMessage): Assistant agent's initial system message.
147
-
-**init_user_sys_msg** (BaseMessage): User agent's initial system message.
150
+
-**init_assistant_sys_msg** (Optional[BaseMessage]): Assistant agent's initial system message.
151
+
-**init_user_sys_msg** (Optional[BaseMessage]): User agent's initial system message.
148
152
-**assistant_agent_kwargs** (Dict, optional): Additional arguments to pass to the assistant agent. (default: :obj:`None`)
149
153
-**user_agent_kwargs** (Dict, optional): Additional arguments to pass to the user agent. (default: :obj:`None`)
150
154
-**output_language** (str, optional): The language to be output by the agents. (default: :obj:`None`)
151
155
-**stop_event** (Optional[threading.Event], optional): Event to signal termination of the agent's operation. When set, the agent will terminate its execution. (default: :obj:`None`)
156
+
-**assistant_agent** (ChatAgent, optional): A pre-configured ChatAgent to use as the assistant. If provided, this will override the creation of a new assistant agent. (default: :obj:`None`)
157
+
-**user_agent** (ChatAgent, optional): A pre-configured ChatAgent to use as the user. If provided, this will override the creation of a new user agent. (default: :obj:`None`)
@@ -175,7 +181,7 @@ is not specified, set it to improve task performance.
175
181
-**sys_msg_generator** (SystemMessageGenerator): A system message generator for agents.
176
182
-**sys_msg_meta_dicts** (list): A list of system message meta dicts.
177
183
-**critic_role_name** (str): The name of the role played by the critic.
178
-
-**critic_criteria** (str, optional): Critic criteria for the critic agent. If not specified, set the criteria to improve task performance. (default: :obj:`None`)
184
+
-**critic_criteria** (str, optional): Critic criteria for the critic agent. If not specified, set it to improve task performance. (default: :obj:`None`)
179
185
-**critic_kwargs** (Dict, optional): Additional arguments to pass to the critic. (default: :obj:`None`)
0 commit comments