Module: OpenAI::Models::Beta::BetaCustomTool::AllowedCaller

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

Constant Summary collapse

DIRECT =

Returns:

  • (:direct)
:direct
PROGRAMMATIC =

Returns:

  • (:programmatic)
:programmatic

Instance Method Summary collapse

Methods included from Internal::Type::Enum

==, ===, coerce, dump, hash, inspect, to_sorbet_type, values, 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, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Instance Method Details

#initialize(name:, allowed_callers: nil, async: 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::Beta::BetaCustomTool::AllowedCaller>, nil) (defaults to: nil)

    The tool invocation context(s).

  • async (Boolean) (defaults to: nil)

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

  • 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::Beta::BetaCustomTool::Format::Text, OpenAI::Models::Beta::BetaCustomTool::Format::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.



79
80
81
82
83
84
85
86
87
# File 'lib/openai/models/beta/beta_custom_tool.rb', line 79

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

  DIRECT = :direct
  PROGRAMMATIC = :programmatic

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

#self?.values::Array[OpenAI::Models::Beta::BetaCustomTool::allowed_caller]

Returns:

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


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

def self?.values: -> ::Array[OpenAI::Models::Beta::BetaCustomTool::allowed_caller]