Class: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/chat/chat_completion_chunk.rb

Overview

See Also:

Defined Under Namespace

Modules: Role Classes: FunctionCall, ToolCall

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, #inspect, inspect, 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) ⇒ Object

Some parameter documentations has been truncated, see FunctionCall for more details.

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

Parameters:

  • arguments (String) (defaults to: nil)

    The arguments to call the function with, as generated by the model in JSON forma

  • name (String) (defaults to: nil)

    The name of the function to call.



# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 189

Instance Attribute Details

#contentString?

The contents of the chunk message.

Returns:

  • (String, nil)


158
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 158

optional :content, String, nil?: true

#function_callOpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall?

Deprecated.

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



167
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 167

optional :function_call, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall }

#refusalString?

The refusal message generated by the model.

Returns:

  • (String, nil)


173
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 173

optional :refusal, String, nil?: true

#roleSymbol, ...

The role of the author of this message.



179
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 179

optional :role, enum: -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Role }

#tool_callsArray<OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall>?



184
185
186
187
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 184

optional :tool_calls,
-> {
  OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall]
}

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 249