Replies: 2 comments 1 reply
-
Try send "TERMINATE" when using |
Beta Was this translation helpful? Give feedback.
1 reply
-
Ugly but functional awaiting #1551. I have overridden the get_human_input method to support streaming with SocketIO. Additionally, I have set a global variable next_chat_trigger which is set to True when the LLM message ends with "COMPLETED", thus forcing an 'exit' and moving to the next sequential chat. def get_human_input(self, prompt: str) -> str:
global message_chat
global next_chat_trigger
if ( next_chat_trigger ):
print('next_chat_trigger')
next_chat_trigger = False
message_chat = None
return 'exit'
else:
socketio.emit('message', {"sender": agent_talking.name,
"content": prompt}, to = session['current_session_id'])
while not message_chat:
pass
reply = message_chat
message_chat = None
self._human_input.append(reply)
socketio.emit('message', {"sender": user.name,
"content": reply}, to = session['current_session_id'])
return reply
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Autogen via WebSocket with the new initiate_chats() and a human_input_mode set to TERMINATE. That's because I need frequent real user input.
Everything looks okay via Terminal, especially when a chat completes its work and it's time to move to the next one: I just have to type 'exit' or press enter.
BUT if I send 'exit' or an empty string via socket (using in pytnon user.send(message, agent_talking)), it will start a loop where the agent asks if it can do something else and the user keeps saying 'exit'.
I've read ALL the code and I didn't find a single line that would allow me to stop a chat programmatically.
Am I dumb? Probably. So here I'm asking for help.
Beta Was this translation helpful? Give feedback.
All reactions