Skip to content

@chinmaymk/aikit v0.0.40


@chinmaymk/aikit / AnthropicStreamEvent

Type Alias: AnthropicStreamEvent

AnthropicStreamEvent = { type: "message_start"; message: { usage: { input_tokens: number; output_tokens: number; cache_creation_input_tokens?: number; cache_read_input_tokens?: number; }; }; } | { type: "content_block_start"; index: number; content_block: AnthropicContentBlock; } | { type: "content_block_delta"; index: number; delta: { type: "text_delta"; text: string; } | { type: "input_json_delta"; partial_json: string; } | { type: "thinking_delta"; thinking: string; } | { type: "signature_delta"; signature: string; }; } | { type: "message_delta"; delta: { stop_reason?: string; stop_sequence?: string | null; }; usage?: { output_tokens: number; }; } | { type: "error"; error: { type: string; message: string; }; } | {[key: string]: unknown; type: string; }

Defined in: providers/anthropic-transformers.ts:134

Released under the MIT License.