Class: OpenAI::Models::Beta::BetaCustomTool

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

Defined Under Namespace

Modules: AllowedCaller, Format

Instance Attribute Summary collapse

Class Method 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

#initializeObject



37
# File 'sig/openai/models/beta/beta_custom_tool.rbs', line 37

def initialize: (

Instance Attribute Details

#allowed_callersArray<Symbol, OpenAI::Models::Beta::BetaCustomTool::AllowedCaller>?

The tool invocation context(s).

Parameters:

  • value (::Array[OpenAI::Models::Beta::BetaCustomTool::allowed_caller], nil)

Returns:



23
24
25
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 23

optional :allowed_callers,
-> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::BetaCustomTool::AllowedCaller] },
nil?: true

#defer_loadingBoolean?

Whether this tool should be deferred and discovered via tool search.

Parameters:

Returns:



31
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 31

optional :defer_loading, OpenAI::Internal::Type::Boolean

#descriptionString?

Optional description of the custom tool, used to provide more context.

Parameters:

  • (String)

Returns:

  • (String, nil)


37
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 37

optional :description, String

#format_OpenAI::Models::Beta::BetaCustomTool::Format::Text, ...

The input format for the custom tool. Default is unconstrained text.



43
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 43

optional :format_, union: -> { OpenAI::Beta::BetaCustomTool::Format }, api_name: :format

#nameString

The name of the custom tool, used to identify it in tool calls.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 11

required :name, String

#typeSymbol, :custom

The type of the custom tool. Always custom.

Parameters:

  • value (:custom)

Returns:

  • (Symbol, :custom)


17
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 17

required :type, const: :custom

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_custom_tool.rb', line 67

Instance Method Details

#to_hash{

Returns:

  • ({)


46
# File 'sig/openai/models/beta/beta_custom_tool.rbs', line 46

def to_hash: -> {