Skip to content

Commit

Permalink
fix: the priority issue in the model configuration for user_agent_kwa…
Browse files Browse the repository at this point in the history
…rgs and assistant_agent_kwargs (#1150)
  • Loading branch information
coolbeevip authored Nov 5, 2024
1 parent 01e5803 commit 059a674
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions camel/societies/role_playing.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,13 @@ def _init_agents(
"""
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,
Expand Down

0 comments on commit 059a674

Please sign in to comment.