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

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

Defined Under Namespace

Modules: Type Classes: Function

Instance Attribute 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 Function for more details.

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 276

Instance Attribute Details

#functionOpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function?



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

optional :function, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function }

#idString?

The ID of the tool call.

Returns:

  • (String, nil)


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

optional :id, String

#indexInteger

Returns:

  • (Integer)


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

required :index, Integer

#typeSymbol, ...

The type of the tool. Currently, only ‘function` is supported.



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

optional :type, enum: -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Type }