Skip to content

FunctionResponseEvent

autogen.events.agent_events.FunctionResponseEvent #

FunctionResponseEvent(uuid=None, **kwargs)

Bases: BasePrintReceivedEvent

Source code in autogen/events/base_event.py
def __init__(self, uuid: Optional[UUID] = None, **kwargs: Any) -> None:
    uuid = uuid or uuid4()
    super().__init__(uuid=uuid, **kwargs)

name class-attribute instance-attribute #

name = None

role class-attribute instance-attribute #

role = 'function'

content instance-attribute #

content

uuid instance-attribute #

uuid

sender_name instance-attribute #

sender_name

recipient_name instance-attribute #

recipient_name

print #

print(f=None)
Source code in autogen/events/agent_events.py
def print(self, f: Optional[Callable[..., Any]] = None) -> None:
    f = f or print
    super().print(f)

    id = self.name or "No id found"
    func_print = f"***** Response from calling {self.role} ({id}) *****"
    f(colored(func_print, "green"), flush=True)
    f(self.content, flush=True)
    f(colored("*" * len(func_print), "green"), flush=True)

    f("\n", "-" * 80, flush=True, sep="")