#How can I implement a message listener / event trigger?
8 messages · Page 1 of 1 (latest)
Thank you! ❤️ I will try it out tomorrow. and let you know how it goes.
@stable spruce I've spent some time with this and realised that only the UserProxyWebAgent is configured to send messages back via the websocket with set_queue, a class method of UserProxyWebAgent. How can I achieve the same behaviour for regular agents? I'm hoping not to have to make them all UserProxyWebAgents. I also thought I could have a function in user_proxy that intercepts and sends every message exchanged, but that seems hacky and not good.
Hi @storm briar, groupchat with UI will be more difficult, you will need to set some queue for each agent, the websockt could be reused with some json message
so this is what Im trying to do. I followed your UserProxyWebAgent pattern and did something similar for AssistantAgent. Some messages come through, some don't. I'm still debugging. What do you mean by "the websocket could be reused with some json message"?
You could use a json message on websocket and inform which agent is talking like { "agent": "<name>", "message":message } so this way on the UI you can check who is sending the message
Thank you. One last question, after giving AssistantWebAgents queues and setting them, I find that sometimes the messages do not get sent. Only some of them. Did you have any experience with this and why this happens?