OpenRouter TypeScript SDK - v1.0.6
    Preparing search index...

    Interface ChatCompletionChunk

    Response chunk for SSE (Server-Sent Events) streaming

    interface ChatCompletionChunk {
        id: string;
        object: "chat.completion.chunk";
        created: number;
        model: string;
        choices: {
            index: number;
            delta: {
                role?: ChatRole;
                content?: string;
                tool_calls?: {
                    index: number;
                    id?: string;
                    type?: "function";
                    function?: { name?: string; arguments?: string };
                }[];
            };
            finish_reason?: null
            | string;
        }[];
    }
    Index

    Properties

    id: string
    object: "chat.completion.chunk"
    created: number
    model: string
    choices: {
        index: number;
        delta: {
            role?: ChatRole;
            content?: string;
            tool_calls?: {
                index: number;
                id?: string;
                type?: "function";
                function?: { name?: string; arguments?: string };
            }[];
        };
        finish_reason?: null
        | string;
    }[]