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
Hi, can you please elaborate as to why returning False, None is required to continue the conversation flow? From the register_reply() Args documentation the following line is present under the trigger argument:
- If a callable is provided, the reply function will be called when the callable returns True.
However as noted above the reply_func must return False, None and the trigger in this case is the autogen.Agent class.
Hi, can you please elaborate as to why returning False, None is required to continue the conversation flow? From the register_reply() Args documentation the following line is present under the trigger argument:
If a callable is provided, the reply function will be called when the callable returns True.
However as noted above the reply_func must return False, None and the trigger in this case is the autogen.Agent class.
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.
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.
The text was updated successfully, but these errors were encountered: