Type alias CreateChatCompletionResponse

CreateChatCompletionResponse: {
    choices: {
        finish_reason: "stop" | "length" | "function_call" | "content_filter";
        index: number;
        message: ChatCompletionResponseMessage;
    }[];
    created: number;
    id: string;
    model: string;
    object: string;
    usage?: CompletionUsage;
}

Represents a chat completion response returned by model, based on the provided input.

Type declaration

  • choices: {
        finish_reason: "stop" | "length" | "function_call" | "content_filter";
        index: number;
        message: ChatCompletionResponseMessage;
    }[]

    A list of chat completion choices. Can be more than one if n is greater than 1.

  • created: number

    The Unix timestamp (in seconds) of when the chat completion was created.

  • id: string

    A unique identifier for the chat completion.

  • model: string

    The model used for the chat completion.

  • object: string

    The object type, which is always chat.completion.

  • Optional usage?: CompletionUsage

Generated using TypeDoc