Open XuhuiZhou opened 1 month ago
@ProKil
I am proposing removing these lines:
agents_model_names = [model_dict["agent1"], model_dict["agent2"]]
for agent_name, agent_model in zip(env.agents, agents_model_names):
if agent_model == "human":
agents[agent_name] = HumanAgent(agent_name)
elif agent_model == "redis":
agents[agent_name] = RedisAgent(agent_name)
elif script_like and not json_in_script:
agents[agent_name] = ScriptWritingAgent(
agent_name,
model_name=agent_model,
background=env.background,
agent_names=env.agents,
)
else:
agents[agent_name] = LLMAgent(
agent_name, model_name=agent_model, script_like=script_like
)
Yes.
More generally, we can modularize the server behavior:
Not sure if I understand the 2 point. But here's the branch for the purpose of making Sotopia more organic for other applications. https://github.com/sotopia-lab/sotopia/pull/86
Has this already been solved in #69 ?
Description of the bug
The agents have been reinitialized here, which is a problematic behavior since the agents have been initialized before:
https://github.com/sotopia-lab/sotopia/blob/184d1ca84e03c549bab05d2b8b530d65b1c75a14/sotopia/server.py#L119
Steps To Reproduce
Just need to look at it
Additional Information
No response