Module: OpenAI::Models::Beta::BetaFunctionTool::AllowedCaller

Extended by:
Internal::Type::Enum
Defined in:
lib/openai/models/beta/beta_function_tool.rb,
sig/openai/models/beta/beta_function_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, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Instance Method Details

#initialize(name:, parameters:, strict:, allowed_callers: nil, defer_loading: nil, description: nil, output_schema: nil, type: :function) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Beta::BetaFunctionTool for more details.

Defines a function in your own code the model can choose to call. Learn more about function calling.

Parameters:

  • name (String)

    The name of the function to call.

  • parameters (Hash{Symbol=>Object}, nil)

    A JSON schema object describing the parameters of the function.

  • strict (Boolean, nil)

    Whether strict parameter validation is enforced for this function tool.

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

    The tool invocation context(s).

  • defer_loading (Boolean) (defaults to: nil)

    Whether this function is deferred and loaded via tool search.

  • description (String, nil) (defaults to: nil)

    A description of the function. Used by the model to determine whether or not to

  • output_schema (Hash{Symbol=>Object}, nil) (defaults to: nil)

    A JSON schema object describing the JSON value encoded in string outputs for thi

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

    The type of the function tool. Always function.



83
84
85
86
87
88
89
90
91
# File 'lib/openai/models/beta/beta_function_tool.rb', line 83

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

  DIRECT = :direct
  PROGRAMMATIC = :programmatic

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

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

Returns:

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


67
# File 'sig/openai/models/beta/beta_function_tool.rbs', line 67

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