Class: OpenAI::Models::Responses::ToolChoiceTypes

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

Defined Under Namespace

Modules: Type

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, 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(type:) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Responses::ToolChoiceTypes for more details.

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

Parameters:



# File 'lib/openai/models/responses/tool_choice_types.rb', line 24

Instance Attribute Details

#typeSymbol, OpenAI::Models::Responses::ToolChoiceTypes::Type

The type of hosted tool the model should to use. Learn more about built-in tools.

Allowed values are:

  • file_search
  • web_search_preview
  • computer
  • computer_use_preview
  • computer_use
  • code_interpreter
  • image_generation

Parameters:

  • value (OpenAI::Models::Responses::ToolChoiceTypes::type_)

Returns:



22
# File 'lib/openai/models/responses/tool_choice_types.rb', line 22

required :type, enum: -> { OpenAI::Responses::ToolChoiceTypes::Type }

Instance Method Details

#to_hash{

Returns:

  • ({)


14
# File 'sig/openai/models/responses/tool_choice_types.rbs', line 14

def to_hash: -> {