class

OpenAI::ChatCompletionStreamResponseDelta

Inherits JSON::Serializable < Reference < Object

A chat completion delta generated by streamed model responses.

Constructors

new(content : ChatCompletionStreamResponseDeltaContent | Nil = nil, function_call : ChatCompletionStreamResponseDeltaFunctionCall | Nil = nil, tool_calls : Array(ChatCompletionMessageToolCallChunk) | Nil = nil, role : ChatCompletionStreamResponseDeltaRole | Nil = nil, refusal : ChatCompletionStreamResponseDeltaRefusal | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

content
Source
content=(content : ChatCompletionStreamResponseDeltaContent | Nil)
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 : ChatCompletionStreamResponseDeltaFunctionCall | 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 : ChatCompletionStreamResponseDeltaRefusal | Nil)
Source
role

The role of the author of this message.

Source
role=(role : ChatCompletionStreamResponseDeltaRole | Nil)

The role of the author of this message.

Source
tool_calls
Source
tool_calls=(tool_calls : Array(ChatCompletionMessageToolCallChunk) | Nil)
Source