Skip to content

ToolCall

autogen.beta.events.types.ToolCall #

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 = '{}'

serialized_arguments property writable #

serialized_arguments

to_api #

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