Skip to content

ToolCallEvent

autogen.beta.events.tool_events.ToolCallEvent #

Bases: ToolEvent

Represents a single tool invocation requested by the model.

id class-attribute instance-attribute #

id = Field(default_factory=lambda: str(uuid4()))

name instance-attribute #

name

arguments class-attribute instance-attribute #

arguments = '{}'

provider_data class-attribute instance-attribute #

provider_data = Field(default_factory=list)

serialized_arguments property writable #

serialized_arguments

to_api #

to_api()
Source code in autogen/beta/events/tool_events.py
def to_api(self) -> dict[str, Any]:
    return {
        "id": self.id,
        "type": "function",
        "function": {
            "arguments": json.dumps(self.serialized_arguments),
            "name": self.name,
        },
    }