Represents an AI's request to call a tool.
ToolCall()Example:
{"name": "foo", "args": {"a": 1}, "id": "123"}
This represents a request to call the tool named "foo" with arguments {"a": 1} and an identifier of "123".
create_tool_call may also be used as a factory to create a
ToolCall. Benefits include:
Used for discrimination.
An identifier associated with the tool call.
An identifier is needed to associate a tool call request with a tool call result in events when multiple concurrent tool calls are made.
The name of the tool to be called.
The arguments to the tool call.
Index of block in aggregate response. Used during streaming.
Provider-specific metadata.