Class: OpenAI::Models::Responses::NamespaceTool::Tool::Function

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

Defined Under Namespace

Modules: AllowedCaller

Instance Attribute 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



73
# File 'sig/openai/models/responses/namespace_tool.rbs', line 73

def initialize: (

Instance Attribute Details

#allowed_callersArray<Symbol, OpenAI::Models::Responses::NamespaceTool::Tool::Function::AllowedCaller>?

The tool invocation context(s).

Parameters:

  • value (::Array[OpenAI::Models::Responses::NamespaceTool::Tool::Function::allowed_caller], nil)

Returns:



68
69
70
71
72
# File 'lib/openai/models/responses/namespace_tool.rb', line 68

optional :allowed_callers,
-> {
  OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Responses::NamespaceTool::Tool::Function::AllowedCaller]
},
nil?: true

#defer_loadingBoolean?

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

Parameters:

Returns:



78
# File 'lib/openai/models/responses/namespace_tool.rb', line 78

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

#descriptionString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


83
# File 'lib/openai/models/responses/namespace_tool.rb', line 83

optional :description, String, nil?: true

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


57
# File 'lib/openai/models/responses/namespace_tool.rb', line 57

required :name, String

#output_schemaHash{Symbol=>Object}?

A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:

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


90
91
92
# File 'lib/openai/models/responses/namespace_tool.rb', line 90

optional :output_schema,
OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown],
nil?: true

#parametersObject?

Parameters:

  • value (top, nil)

Returns:

  • (Object, nil)


97
# File 'lib/openai/models/responses/namespace_tool.rb', line 97

optional :parameters, OpenAI::Internal::Type::Unknown, nil?: true

#strictBoolean?

Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.

Parameters:

Returns:



105
# File 'lib/openai/models/responses/namespace_tool.rb', line 105

optional :strict, OpenAI::Internal::Type::Boolean, nil?: true

#typeSymbol, :function

Parameters:

  • value (:function)

Returns:

  • (Symbol, :function)


62
# File 'lib/openai/models/responses/namespace_tool.rb', line 62

required :type, const: :function

Instance Method Details

#to_hash{

Returns:

  • ({)


84
# File 'sig/openai/models/responses/namespace_tool.rbs', line 84

def to_hash: -> {