A chat completion message generated by a model.

interface ChatsMessageResponse {
    content: string;
    function_call?: FunctionCall;
    name?: string;
    refusal?: string;
    role: string;
    tool_call_id?: string;
    tool_calls: ChatsToolCall[];
}

Properties

content: string

Content of the message.

function_call?: FunctionCall

The name and arguments of a function that should be called, as generated by the model.

Deprecated: function_call has been deprecated by OpenAI and replaced by tool_calls.

name?: string

Name of the function to call.

(Azure OpenAI provider model requests only.).

refusal?: string

Refusal message generated by the model, if any.

role: string

Role of the author of this message.

tool_call_id?: string

The ID of the tool call that this message is responding to.

(Azure OpenAI provider model requests only.).

tool_calls: ChatsToolCall[]

Tool calls generated by the model, such as function calls.