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
The group chat can just terminate when an agent is selected as the speaker. It could be done by having the group chat exposes a SpeakerSelectedEvent and add a new termination condition, NextSpeakerMatchTermination, that terminates the group chat when a SpeakerSelectedEvent emitts with a matching spaker.
The use of HandoffTermination means you don't use UserProxyAgent in a group chat, you stop the group chat, give the control back to the applicaiton, and restart it with a new message. The state of the group chat is maintained in memory, or persisted using save_state and load_state.
If for some reason, you must use UserProxyAgent with a UI (e.g., your model doesn't support function calling), then your application must be asynchronous. In the input callback of UserProxyAgent, you need to send a message to the frontend, wait on a specific asyncio.Event, when the user message arrives back in a separate coroutine or your fast api handler, you set the asyncio.Event, and obtain the message to be used as response.
If the above sound too complicated to you -- I agree, and I think there should be a more elegant way to address this scenario for SelectorGroupChat and RoundRobinGroupChat when function calling model is not available.
One idea is to have the group chat just terminate when user proxy is selected as the speaker. It could be done by having the group chat exposes a SpeakerSelectedEvent and add a new termination condition, NextSpeakerMatchTermination, that terminates the group chat when a SpeakerSelectedEvent emitts with a matching spaker.
The group chat can just terminate when an agent is selected as the speaker. It could be done by having the group chat exposes a SpeakerSelectedEvent and add a new termination condition, NextSpeakerMatchTermination, that terminates the group chat when a SpeakerSelectedEvent emitts with a matching spaker.
For Context: #5324 (comment)_
Originally posted by @ekzhu in #5324 (comment)
The text was updated successfully, but these errors were encountered: