OpenAI::ChatCompletionResponseMessage
Inherits JSON::Serializable < Reference < Object
A chat completion message generated by the model.
Constructors
new(pull : JSON::PullParser)
Sourcenew(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)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
Annotations for the message, when applicable, as when using the web search tool.
audio
Sourceaudio=(audio : ChatCompletionResponseMessageAudio | Nil)
Sourcecontent
Sourcecontent=(content : ChatCompletionResponseMessageContent)
Sourcefunction_call
Deprecated and replaced by tool_calls. The name and arguments of a function that should be called, as generated by the model.
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.
refusal
Sourcerefusal=(refusal : ChatCompletionResponseMessageRefusal)
Sourcetool_calls
Sourcetool_calls=(tool_calls : ChatCompletionMessageToolCalls | Nil)
Source