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

fix: the priority issue in the model configuration for user_agent_kwargs and assistant_agent_kwargs (#1150)

Lei Zhang059a6748b617
diff --git a/camel/societies/role_playing.py b/camel/societies/role_playing.py
index 86cd4c424..69556adb8 100644
--- a/camel/societies/role_playing.py
+++ b/camel/societies/role_playing.py
@@ -332,11 +332,13 @@ class RolePlaying:
"""
if self.model is not None:
if assistant_agent_kwargs is None:
- assistant_agent_kwargs = {}
- assistant_agent_kwargs.update(dict(model=self.model))
+ assistant_agent_kwargs = {'model': self.model}
+ elif 'model' not in assistant_agent_kwargs:
+ assistant_agent_kwargs.update(dict(model=self.model))
if user_agent_kwargs is None:
- user_agent_kwargs = {}
- user_agent_kwargs.update(dict(model=self.model))
+ user_agent_kwargs = {'model': self.model}
+ elif 'model' not in user_agent_kwargs:
+ user_agent_kwargs.update(dict(model=self.model))
self.assistant_agent = ChatAgent(
init_assistant_sys_msg,