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
Currently if you call on_reset on a society of mind agent before .run() it will raise an error suggesting that the group chat needs to be initialized before it can be reset. @ekzhu and I discussed that this behavior is a bug.
What did you expect to happen?
no bugs
How can we reproduce it (as minimally and precisely as possible)?
importasynciofromautogen_agentchat.messagesimportTextMessagefromautogen_agentchat.agentsimportAssistantAgent, SocietyOfMindAgentfromautogen_ext.models.openaiimportOpenAIChatCompletionClientfromautogen_agentchat.teamsimportRoundRobinGroupChatfromautogen_agentchat.conditionsimportTextMentionTerminationasyncdefmain() ->None:
model_client=OpenAIChatCompletionClient(model="gpt-4o")
agent1=AssistantAgent("assistant1", model_client=model_client, system_message="You are a writer, write well.")
agent2=AssistantAgent(
"assistant2",
model_client=model_client,
system_message="You are an editor, provide critical feedback. Respond with 'APPROVE' if the text addresses all feedbacks.",
)
inner_termination=TextMentionTermination("APPROVE")
inner_team=RoundRobinGroupChat([agent1, agent2], termination_condition=inner_termination)
society_of_mind_agent=SocietyOfMindAgent("society_of_mind", team=inner_team, model_client=model_client)
awaitsociety_of_mind_agent.on_reset(cancellation_token=None)
result=awaitsociety_of_mind_agent.on_messages(messages=[
TextMessage(source="user", content="I am a writer.")
],
cancellation_token=None
)
print(result)
if__name__=="__main__":
asyncio.run(main())
AutoGen version
0.4.5
Which package was this bug in
AgentChat
Model used
gpt-4o
Python version
No response
Operating system
No response
Any additional info you think would be helpful for fixing this bug
No response
The text was updated successfully, but these errors were encountered:
What happened?
Currently if you call
on_reset
on a society of mind agent before.run()
it will raise an error suggesting that the group chat needs to be initialized before it can be reset. @ekzhu and I discussed that this behavior is a bug.What did you expect to happen?
no bugs
How can we reproduce it (as minimally and precisely as possible)?
Adapted from https://microsoft.github.io/autogen/stable/reference/python/autogen_agentchat.agents.html#autogen_agentchat.agents.SocietyOfMindAgent
AutoGen version
0.4.5
Which package was this bug in
AgentChat
Model used
gpt-4o
Python version
No response
Operating system
No response
Any additional info you think would be helpful for fixing this bug
No response
The text was updated successfully, but these errors were encountered: