Skip to content

guidellm.schemas.tool_call

Tool call data models for OpenAI-compatible API responses.

Provides Pydantic models for representing tool calls returned by OpenAI-compatible APIs. Used by both the response and request statistics schemas to carry tool call payloads through the benchmarking pipeline.

ToolCall

Bases: BaseModel

A single tool call from an OpenAI-compatible API response.

Source code in src/guidellm/schemas/tool_call.py
class ToolCall(BaseModel):
    """A single tool call from an OpenAI-compatible API response."""

    id: str = ""
    type: str = "function"
    function: ToolCallFunction = Field(default_factory=ToolCallFunction)

ToolCallFunction

Bases: BaseModel

Function name and arguments for a single tool call.

Source code in src/guidellm/schemas/tool_call.py
class ToolCallFunction(BaseModel):
    """Function name and arguments for a single tool call."""

    name: str = ""
    arguments: str = ""