Open stevenbaert opened 8 months ago
@sonichi .. is there a way to programatically interrupt an "in-progress" agent chat (ie a run of initiate_chat
)?
Any pointers here will be helpful in crafting a solution that is lifted up into autogenstudio
One plausible approach is to use the async method a_initiate_chat()
and in a_check_termination_and_human_input()
check an event's status which can be set outside.
@sonichi, is there anyone else looking at this who can share insights? Maybe @ekzhu ?
It would be good if you can share more details on the async method you are referring to above or pointers to examples. Concretely, what is a code example where a chat can be initiated and then also terminated midway execution.
In the mean time, a developer experience that seems reasonable to me includes:
initiate_chat
, we get a process_id
or some type of handleautogen.terminate_chate(process_id)
which terminates that process termination_callback
(that returns the current state of the agents) that developers can register to allow their apps degrade gracefully. E.g. my user makes a request to agents, in the middle the user terminates the request, this should fire my termination call back to ensure something sensible is returned to the user. It's 100% possible I am thinking of this the wrong way, so happy to get thoughts.
@jackgerrits , this is the issue I mentioned on the ability to terminate an agent run.
Describe the issue
No response
Steps to reproduce
Screenshots and logs
No response
Additional Information
No response