A chat completion message generated by the model.

interface ChatCompletionMessage {
    audio?: null | ChatCompletionAudio;
    content: null | string;
    function_call?: null | OpenAIClient.Chat.Completions.ChatCompletionMessage.FunctionCall;
    refusal: null | string;
    role: "assistant";
    tool_calls?: ChatCompletionMessageToolCall[];
}

Properties

audio?: null | ChatCompletionAudio

If the audio output modality is requested, this object contains data about the audio response from the model. Learn more.

content: null | string

The contents of the message.

@deprecated: Deprecated and replaced by tool_calls. The name and arguments of a function that should be called, as generated by the model.

refusal: null | string

The refusal message generated by the model.

role: "assistant"

The role of the author of this message.

The tool calls generated by the model, such as function calls.