Class: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta
- Defined in:
- lib/openai/models/chat/chat_completion_chunk.rb,
sig/openai/models/chat/chat_completion_chunk.rbs
Overview
Defined Under Namespace
Modules: Role Classes: Audio, FunctionCall, ToolCall
Instance Attribute Summary collapse
-
#audio ⇒ OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio?
A partial audio response.
-
#content ⇒ String?
The contents of the chunk message.
-
#function_call ⇒ OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall?
Deprecated and replaced by
tool_calls. -
#refusal ⇒ String?
The refusal message generated by the model.
-
#role ⇒ OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::role?
The role of the author of this message.
- #tool_calls ⇒ Array<OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall>?
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(arguments: nil, name: nil) ⇒ Delta
constructor
A new instance of Delta.
- #to_hash ⇒ { ?audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio, ?content: String?, ?function_call: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall, ?refusal: String?, ?role: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::role, ?tool_calls: ::Array[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall] }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(arguments: nil, name: nil) ⇒ Delta
Returns a new instance of Delta.
|
|
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 277
|
Instance Attribute Details
#audio ⇒ OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio?
A partial audio response. Audio chunks may carry an ID, base64 data, or transcript text; the final audio update contains only its expiry timestamp.
240 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 240 optional :audio, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio } |
#content ⇒ String?
The contents of the chunk message.
246 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 246 optional :content, String, nil?: true |
#function_call ⇒ OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall?
Deprecated and replaced by tool_calls. The name and arguments of a function
that should be called, as generated by the model.
255 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 255 optional :function_call, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall } |
#refusal ⇒ String?
The refusal message generated by the model.
261 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 261 optional :refusal, String, nil?: true |
#role ⇒ OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::role?
The role of the author of this message.
267 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 267 optional :role, enum: -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Role } |
#tool_calls ⇒ Array<OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall>?
272 273 274 275 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 272 optional( :tool_calls, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall] } ) |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 393
|
Instance Method Details
#to_hash ⇒ { ?audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio, ?content: String?, ?function_call: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall, ?refusal: String?, ?role: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::role, ?tool_calls: ::Array[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall] }
308 309 310 311 312 313 314 315 |
# File 'sig/openai/models/chat/chat_completion_chunk.rbs', line 308
def to_hash: -> {
?audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio,
?content: String?,
?function_call: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall,
?refusal: String?,
?role: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::role,
?tool_calls: ::Array[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall]
}
|