Replies: 4 comments
-
Hi, can you please elaborate as to why returning
However as noted above the |
Beta Was this translation helpful? Give feedback.
-
The triggers decides whether to enter the registered reply function. In this case the trigger basically says any message from any agent is accepted and will enter the reply function. Autogen uses a pipeline of register reply functions to handle incoming messages. If one reply function gets triggered, it will process the message, and returns a boolean signal. If the signal is True, then the rest of the pipeline gets short-circuited and the message generated from the triggered reply funciton will be returned. If the signal is False, then the message continue to the next reply function in the pipeline. In this example, the message gets passed on to the next reply function, because the signal is False. However the message was processed (i.e., printed). It is just that the control gets handed back to the pipeline. |
Beta Was this translation helpful? Give feedback.
-
Thank you :) |
Beta Was this translation helpful? Give feedback.
-
Hi everyone! I have a couple of questions regarding the reply functions.
A related question: Are there any plans to add a callback after generating each message? Or maybe there are other ways on how to get access to the latest messages as soon as they are generated? |
Beta Was this translation helpful? Give feedback.
-
Assuming you have two agents
user_proxy
andassistant
, you can register a function with these agents that gets called with some parameters.In the above, we register a
print_messages
message that is called each time the agent receive a message.Originally posted by @victordibia in #478 (comment)
It's a good example to add to FAQ.
Beta Was this translation helpful? Give feedback.
All reactions