Class: OpenAI::Models::Responses::ResponseInputItem::AdditionalTools

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_input_item.rb,
sig/openai/models/responses/response_input_item.rbs

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_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 ⇒ AdditionalTools

Returns a new instance of AdditionalTools.

Parameters:

  • tools —

    A list of additional tools made available at this item.

  • id —

    The unique ID of this additional tools item.

  • role —

    The role that provided the additional tools. Only developer is supported.

  • type —

    The item type. Always additional_tools.

  • tools: (::Array[OpenAI::Models::Responses::tool])
  • id: (String, nil)
  • role: (:developer)
  • type: (:additional_tools)


499
500
501
502
503
504
# File 'sig/openai/models/responses/response_input_item.rbs', line 499

def initialize: (
  tools: ::Array[OpenAI::Models::Responses::tool],
  ?id: String?,
  ?role: :developer,
  ?type: :additional_tools
) -> void

Instance Attribute Details

#id ⇒ String?

The unique ID of this additional tools item.

Returns:

  • (String, nil)


616
# File 'lib/openai/models/responses/response_input_item.rb', line 616

optional :id, String, nil?: true

#role ⇒ :developer

The role that provided the additional tools. Only developer is supported.

Returns:

  • (:developer)


598
# File 'lib/openai/models/responses/response_input_item.rb', line 598

required :role, const: :developer

#tools ⇒ ::Array[OpenAI::Models::Responses::tool]

A list of additional tools made available at this item.

Returns:

  • (::Array[OpenAI::Models::Responses::tool])


604
# File 'lib/openai/models/responses/response_input_item.rb', line 604

required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] }

#type ⇒ :additional_tools

The item type. Always additional_tools.

Returns:

  • (:additional_tools)


610
# File 'lib/openai/models/responses/response_input_item.rb', line 610

required :type, const: :additional_tools

Instance Method Details

#to_hash ⇒ { ?role: :developer, tools: ::Array[OpenAI::Models::Responses::tool], ?type: :additional_tools, ?id: String? }

Returns:

  • ({ ?role: :developer, tools: ::Array[OpenAI::Models::Responses::tool], ?type: :additional_tools, ?id: String? })


506
507
508
509
510
511
# File 'sig/openai/models/responses/response_input_item.rbs', line 506

def to_hash: -> {
  ?role: :developer,
  tools: ::Array[OpenAI::Models::Responses::tool],
  ?type: :additional_tools,
  ?id: String?
}