Class: OpenAI::Models::Beta::BetaResponseInputItem::AdditionalTools

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

Defined Under Namespace

Classes: Agent

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(tools:, id: nil, agent: nil, role: :developer, type: :additional_tools) ⇒ AdditionalTools

Returns a new instance of AdditionalTools.

Parameters:

  • tools —

    A list of additional tools made available at this item.

  • id (defaults to: nil) —

    The unique ID of this additional tools item.

  • agent (defaults to: nil) —

    The agent that produced this item.

  • role (defaults to: :developer) —

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

  • type (defaults to: :additional_tools) —

    The item type. Always additional_tools.

  • tools: (::Array[OpenAI::Models::Beta::beta_tool])
  • id: (String, nil) (defaults to: nil)
  • agent: (OpenAI::Beta::BetaResponseInputItem::AdditionalTools::Agent, nil) (defaults to: nil)
  • role: (:developer) (defaults to: :developer)
  • type: (:additional_tools) (defaults to: :additional_tools)


# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1241

Instance Attribute Details

#agent ⇒ OpenAI::Beta::BetaResponseInputItem::AdditionalTools::Agent?

The agent that produced this item.

Returns:

  • (OpenAI::Beta::BetaResponseInputItem::AdditionalTools::Agent, nil)


1239
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1239

optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::AdditionalTools::Agent }, nil?: true

#id ⇒ String?

The unique ID of this additional tools item.

Returns:

  • (String, nil)


1233
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1233

optional :id, String, nil?: true

#role ⇒ :developer

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

Returns:

  • (:developer)


1215
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1215

required :role, const: :developer

#tools ⇒ ::Array[OpenAI::Models::Beta::beta_tool]

A list of additional tools made available at this item.

Returns:

  • (::Array[OpenAI::Models::Beta::beta_tool])


1221
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1221

required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::BetaTool] }

#type ⇒ :additional_tools

The item type. Always additional_tools.

Returns:

  • (:additional_tools)


1227
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 1227

required :type, const: :additional_tools

Instance Method Details

#to_hash ⇒ { ?role: :developer, tools: ::Array[OpenAI::Models::Beta::beta_tool], ?type: :additional_tools, ?id: String?, ?agent: OpenAI::Beta::BetaResponseInputItem::AdditionalTools::Agent? }

Returns:

  • ({ ?role: :developer, tools: ::Array[OpenAI::Models::Beta::beta_tool], ?type: :additional_tools, ?id: String?, ?agent: OpenAI::Beta::BetaResponseInputItem::AdditionalTools::Agent? })


1107
1108
1109
1110
1111
1112
1113
# File 'sig/openai/models/beta/beta_response_input_item.rbs', line 1107

def to_hash: -> {
  ?role: :developer,
  tools: ::Array[OpenAI::Models::Beta::beta_tool],
  ?type: :additional_tools,
  ?id: String?,
  ?agent: OpenAI::Beta::BetaResponseInputItem::AdditionalTools::Agent?
}