Module: OpenAI::Models::Responses::CustomTool::AllowedCaller

Extended by:
Internal::Type::Enum
Defined in:
lib/openai/models/responses/custom_tool.rb,
sig/openai/models/responses/custom_tool.rbs

Constant Summary collapse

DIRECT =

Returns:

  • (:direct)
:direct
PROGRAMMATIC =

Returns:

  • (:programmatic)
:programmatic

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Enum

==, ===, coerce, dump, hash, inspect, to_sorbet_type, values

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/custom_tool.rb', line 67

Instance Method Details

#initialize(name:, allowed_callers: nil, defer_loading: nil, description: nil, format_: nil, type: :custom) ⇒ Object

A custom tool that processes input using a specified format. Learn more about custom tools

Parameters:

  • name (String)

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

  • allowed_callers (Array<Symbol, OpenAI::Models::Responses::CustomTool::AllowedCaller>, nil) (defaults to: nil)

    The tool invocation context(s).

  • defer_loading (Boolean) (defaults to: nil)

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

  • description (String) (defaults to: nil)

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

  • format_ (OpenAI::Models::CustomToolInputFormat::Text, OpenAI::Models::CustomToolInputFormat::Grammar) (defaults to: nil)

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

  • type (Symbol, :custom) (defaults to: :custom)

    The type of the custom tool. Always custom.



61
62
63
64
65
66
67
68
69
# File 'lib/openai/models/responses/custom_tool.rb', line 61

module AllowedCaller
  extend OpenAI::Internal::Type::Enum

  DIRECT = :direct
  PROGRAMMATIC = :programmatic

  # @!method self.values
  #   @return [Array<Symbol>]
end

#self?.values::Array[OpenAI::Models::Responses::CustomTool::allowed_caller]

Returns:

  • (::Array[OpenAI::Models::Responses::CustomTool::allowed_caller])


61
# File 'sig/openai/models/responses/custom_tool.rbs', line 61

def self?.values: -> ::Array[OpenAI::Models::Responses::CustomTool::allowed_caller]