Skip to content

ToolResponseEvent

autogen.events.agent_events.ToolResponseEvent #

ToolResponseEvent(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)

role class-attribute instance-attribute #

role = 'tool'

tool_responses instance-attribute #

tool_responses

content instance-attribute #

content

uuid instance-attribute #

uuid

sender instance-attribute #

sender

recipient instance-attribute #

recipient

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)

    for tool_response in self.tool_responses:
        tool_response.print(f)
        f("\n", "-" * 80, flush=True, sep="")