class

OpenAI::ChatCompletionResponseMessage

Inherits JSON::Serializable < Reference < Object

A chat completion message generated by the model.

Constructors

new(content : ChatCompletionResponseMessageContent = nil, refusal : ChatCompletionResponseMessageRefusal = nil, tool_calls : ChatCompletionMessageToolCalls | Nil = nil, annotations : Array(ChatCompletionResponseMessageAnnotationsItem) | Nil = nil, role : ChatCompletionResponseMessageRole = ChatCompletionResponseMessageRole::Assistant, function_call : ChatCompletionResponseMessageFunctionCall | Nil = nil, audio : ChatCompletionResponseMessageAudio | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

annotations

Annotations for the message, when applicable, as when using the web search tool.

Source
annotations=(annotations : Array(ChatCompletionResponseMessageAnnotationsItem) | Nil)

Annotations for the message, when applicable, as when using the web search tool.

Source
audio
Source
audio=(audio : ChatCompletionResponseMessageAudio | Nil)
Source
content
Source
content=(content : ChatCompletionResponseMessageContent)
Source
function_call

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

Source
function_call=(function_call : ChatCompletionResponseMessageFunctionCall | Nil)

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

Source
refusal
Source
refusal=(refusal : ChatCompletionResponseMessageRefusal)
Source
role

The role of the author of this message.

Source
role=(role : ChatCompletionResponseMessageRole)

The role of the author of this message.

Source
tool_calls
Source
tool_calls=(tool_calls : ChatCompletionMessageToolCalls | Nil)
Source