Interface RawCompletionChunk

One chunk when stream=true

interface RawCompletionChunk {
    choices: {
        finish_reason: null | "length" | "stop" | "content_filter";
        index: number;
        logprobs: null;
        text: string;
    }[];
    created: number;
    id: string;
    model: string;
    object: "text_completion";
    timings?: ResultTimings;
    usage?: null
    | ChatCompletionUsage;
}

Properties

choices: {
    finish_reason: null | "length" | "stop" | "content_filter";
    index: number;
    logprobs: null;
    text: string;
}[]
created: number
id: string
model: string
object: "text_completion"
timings?: ResultTimings
usage?: null | ChatCompletionUsage