Skip to content

ToolErrorEvent

autogen.beta.events.tool_events.ToolErrorEvent #

Bases: ToolResultEvent

Represents a failed tool execution with an associated error.

error instance-attribute #

error

content property writable #

content

parent_id instance-attribute #

parent_id

name instance-attribute #

name

result instance-attribute #

result

to_api #

to_api()
Source code in autogen/beta/events/tool_events.py
def to_api(self) -> dict[str, Any]:
    return {
        "role": "tool",
        "tool_call_id": self.parent_id,
        "content": self.content,
    }