Class: OpenAI::Models::Beta::Threads::Runs::FunctionToolCallDelta

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/threads/runs/function_tool_call_delta.rb,
sig/openai/models/beta/threads/runs/function_tool_call_delta.rbs

Defined Under Namespace

Classes: Function

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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(index:, id: nil, function: nil, type: :function) ⇒ Object

Parameters:

  • index —

    The index of the tool call in the tool calls array.

  • id (defaults to: nil) —

    The ID of the tool call object.

  • function (defaults to: nil) —

    The definition of the function that was called.

  • type (defaults to: :function) —

    The type of tool call. This is always going to be function for this type of tool call.



# File 'lib/openai/models/beta/threads/runs/function_tool_call_delta.rb', line 34

Instance Attribute Details

#function ⇒ OpenAI::Beta::Threads::Runs::FunctionToolCallDelta::Function?

The definition of the function that was called.

Returns:

  • (OpenAI::Beta::Threads::Runs::FunctionToolCallDelta::Function, nil)


32
# File 'lib/openai/models/beta/threads/runs/function_tool_call_delta.rb', line 32

optional :function, -> { OpenAI::Beta::Threads::Runs::FunctionToolCallDelta::Function }

#id ⇒ String?

The ID of the tool call object.

Returns:

  • (String, nil)


26
# File 'lib/openai/models/beta/threads/runs/function_tool_call_delta.rb', line 26

optional :id, String

#index ⇒ Integer

The index of the tool call in the tool calls array.

Returns:

  • (Integer)


13
# File 'lib/openai/models/beta/threads/runs/function_tool_call_delta.rb', line 13

required :index, Integer

#type ⇒ :function

The type of tool call. This is always going to be function for this type of tool call.

Returns:

  • (:function)


20
# File 'lib/openai/models/beta/threads/runs/function_tool_call_delta.rb', line 20

required :type, const: :function

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


52
# File 'sig/openai/models/beta/threads/runs/function_tool_call_delta.rbs', line 52

def to_hash: -> {