ChatCompletionMessage: {
    content: string;
    role: "assistant";
    thinking?: string | null;
}

Defines the shape of an individual message from the model in response to a chat completion request.

Type declaration

  • content: string

    Content of the message, can be any string

  • role: "assistant"

    Role of the message in the conversation. For completions, this is always 'assistant'.

  • Optional thinking?: string | null

    When using a reasoning model, this field can contain the reasoning behind the response. Not all providers/models support this field.