@nickyzj2023/utils
    Preparing search index...

    Type Alias StreamResponse

    流式响应中的单个 SSE 数据块(OpenAI 原始格式)

    type StreamResponse = {
        choices: {
            delta: {
                content?: string | null;
                reasoning?: string | null;
                reasoning_content?: string | null;
                role?: Message["role"];
                tool_calls?: {
                    function?: { arguments?: string; name?: string };
                    id?: string;
                    index: number;
                    type?: "function";
                }[];
            };
            finish_reason: "stop"
            | "length"
            | "tool_calls"
            | "content_filter"
            | null;
            index: number;
        }[];
        created: number;
        id: string;
        model: string;
        object: "chat.completion.chunk";
        usage?: Usage;
    }
    Index

    Properties

    choices: {
        delta: {
            content?: string | null;
            reasoning?: string | null;
            reasoning_content?: string | null;
            role?: Message["role"];
            tool_calls?: {
                function?: { arguments?: string; name?: string };
                id?: string;
                index: number;
                type?: "function";
            }[];
        };
        finish_reason: "stop"
        | "length"
        | "tool_calls"
        | "content_filter"
        | null;
        index: number;
    }[]
    created: number
    id: string
    model: string
    object: "chat.completion.chunk"
    usage?: Usage