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
Does this populate the context for ALL agents or some agents etc?
In PR #4436 ,team_state has an agent_states field that is a dict and maps to each agent. This way specific list of messages are mapped to the actual agent from which they were serialized (or created for) in team.load_state()
fromautogen_agentchat.stateimportBaseTeamState# convert team state to dict (save to file if needed)team_state_dict=vars(team_state)
print(team_state_dict)
# convert back to team state objectteam_state=BaseTeamState(**vars(team_state))
# load team stateawaitagent_team.load_state(team_state)
stream=agent_team.run_stream(task="What was the last line of the poem you wrote?")
awaitConsole(stream)
I think the list of messages as task is to allow better integration with applications. E.g., in a scenario where users might type multiple messages before the application triggering the team run, and nest chats.
The load and save states are designed for persistence and editing of agent states.
Currently a team only support a single message for task.
It should support a list of messages, to prepopulate the context of the agents.
This allows passing a previous conversation history from another team.
This is also useful for nested chats to prepopulate the team participants with messages before generating a response.
The text was updated successfully, but these errors were encountered: