ChatToolCall - TypeScript SDK

ChatToolCall type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Tool call made by the assistant

Example Usage

1import { ChatToolCall } from "@openrouter/sdk/models";
2
3let value: ChatToolCall = {
4 function: {
5 arguments: "{\"location\": \"Boston, MA\"}",
6 name: "get_current_weather",
7 },
8 id: "call_abc123",
9 type: "function",
10};

Fields

FieldTypeRequiredDescription
functionmodels.ChatToolCallFunction✔️N/A
idstring✔️Tool call identifier
typemodels.ChatToolCallType✔️N/A