IRRequest
This content is not available in your language yet.
type IRRequest = { maxTokens: number; messages: { blocks: ( | { t: "text"; text: string; } | { signature?: string; t: "thinking"; text: string; } | { payload?: unknown; provider: string; t: "opaque"; } | { args?: unknown; id: string; name: string; t: "tool_call"; } | { callId: string; content: ( | { t: ...; text: ...; } | { data: ...; mime: ...; t: ...; })[]; isError?: boolean; t: "tool_result"; } | { data: string; mime: string; t: "image"; })[]; meta?: { compactionId?: string; kind?: "compaction_summary"; }; role: "user" | "assistant"; }[]; model: { model: string; provider: string; }; promptTokensEstimate?: number; skipCacheWrite?: boolean; stopSequences?: string[]; system: { cacheable?: boolean; label?: string; text: string; }[]; temperature?: number; thinking?: { budget?: number; off?: boolean; }; tools: { description: string; inputSchema: Record<string, unknown>; name: string; }[];};模型调用请求(IRRequestSchema 推导)。
maxTokens
Section titled “maxTokens”maxTokens: number;messages
Section titled “messages”messages: { blocks: ( | { t: "text"; text: string; } | { signature?: string; t: "thinking"; text: string; } | { payload?: unknown; provider: string; t: "opaque"; } | { args?: unknown; id: string; name: string; t: "tool_call"; } | { callId: string; content: ( | { t: ...; text: ...; } | { data: ...; mime: ...; t: ...; })[]; isError?: boolean; t: "tool_result"; } | { data: string; mime: string; t: "image"; })[]; meta?: { compactionId?: string; kind?: "compaction_summary"; }; role: "user" | "assistant";}[];blocks
Section titled “blocks”blocks: ( | { t: "text"; text: string;} | { signature?: string; t: "thinking"; text: string;} | { payload?: unknown; provider: string; t: "opaque";} | { args?: unknown; id: string; name: string; t: "tool_call";} | { callId: string; content: ( | { t: ...; text: ...; } | { data: ...; mime: ...; t: ...; })[]; isError?: boolean; t: "tool_result";} | { data: string; mime: string; t: "image";})[];optional meta?: { compactionId?: string; kind?: "compaction_summary";};meta.compactionId?
Section titled “meta.compactionId?”optional compactionId?: string;meta.kind?
Section titled “meta.kind?”optional kind?: "compaction_summary";role: "user" | "assistant";model: { model: string; provider: string;};model: string;provider
Section titled “provider”provider: string;promptTokensEstimate?
Section titled “promptTokensEstimate?”optional promptTokensEstimate?: number;skipCacheWrite?
Section titled “skipCacheWrite?”optional skipCacheWrite?: boolean;stopSequences?
Section titled “stopSequences?”optional stopSequences?: string[];system
Section titled “system”system: { cacheable?: boolean; label?: string; text: string;}[];cacheable?
Section titled “cacheable?”optional cacheable?: boolean;label?
Section titled “label?”optional label?: string;text: string;temperature?
Section titled “temperature?”optional temperature?: number;thinking?
Section titled “thinking?”optional thinking?: { budget?: number; off?: boolean;};budget?
Section titled “budget?”optional budget?: number;optional off?: boolean;tools: { description: string; inputSchema: Record<string, unknown>; name: string;}[];description
Section titled “description”description: string;inputSchema
Section titled “inputSchema”inputSchema: Record<string, unknown>;name: string;Was this page helpful?
Thanks for your feedback.