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

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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

#initializeObject



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

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
26
27
# 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
)

#asyncBoolean?

Whether the tool response can be returned asynchronously versus immediately returned on next response creation.

Parameters:

Returns:



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

optional :async, OpenAI::Internal::Type::Boolean

#defer_loadingBoolean?

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

Parameters:

Returns:



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

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

#descriptionString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :description, String

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

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



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

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 85

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {