The TypeScript SDK and docs are currently in beta.
Report issues on GitHub.
Example Usage
import { OpenResponsesNonStreamingResponseToolFunction } from "@openrouter/sdk/models";
let value: OpenResponsesNonStreamingResponseToolFunction = {
type: "function",
name: "get_weather",
parameters: {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state",
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit",
],
"x-speakeasy-unknown-values": "allow",
},
},
"required": [
"location",
],
},
};
Fields
| Field | Type | Required | Description |
|---|---|---|---|
type | ”function” | :heavy_check_mark: | N/A |
name | string | :heavy_check_mark: | N/A |
description | string | :heavy_minus_sign: | N/A |
strict | boolean | :heavy_minus_sign: | N/A |
parameters | Record<string, *any*> | :heavy_check_mark: | N/A |