OpenAI::ChatCompletionStreamResponseDelta
Inherits JSON::Serializable < Reference < Object
A chat completion delta generated by streamed model responses.
Constructors
new(pull : JSON::PullParser)
Sourcenew(content : ChatCompletionStreamResponseDeltaContent | Nil = nil, function_call : ChatCompletionStreamResponseDeltaFunctionCall | Nil = nil, tool_calls : Array(ChatCompletionMessageToolCallChunk) | Nil = nil, role : ChatCompletionStreamResponseDeltaRole | Nil = nil, refusal : ChatCompletionStreamResponseDeltaRefusal | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
content
Sourcecontent=(content : ChatCompletionStreamResponseDeltaContent | Nil)
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 : ChatCompletionStreamResponseDeltaFunctionCall | 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 : ChatCompletionStreamResponseDeltaRefusal | Nil)
Sourcerole=(role : ChatCompletionStreamResponseDeltaRole | Nil)
The role of the author of this message.
tool_calls
Source