TerminationEvent(*, uuid=None, sender, recipient=None, termination_reason)
Bases: BaseEvent
When a workflow termination condition is met
Source code in autogen/events/agent_events.py
| def __init__(
self,
*,
uuid: Optional[UUID] = None,
sender: Union["Agent", str],
recipient: Optional[Union["Agent", str]] = None,
termination_reason: str,
):
super().__init__(
uuid=uuid,
termination_reason=termination_reason,
sender=sender.name if hasattr(sender, "name") else sender,
recipient=recipient.name if hasattr(recipient, "name") else recipient if recipient else None,
)
|
termination_reason instance-attribute
sender instance-attribute
recipient class-attribute
instance-attribute
print
Source code in autogen/events/agent_events.py
| def print(self, f: Optional[Callable[..., Any]] = None) -> None:
f = f or print
f(colored(f"\n>>>>>>>> TERMINATING RUN ({str(self.uuid)}): {self.termination_reason}", "red"), flush=True)
|