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

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

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

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

Parameters:

  • name (String)
  • defer_loading (Boolean) (defaults to: nil)

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

  • description (String, nil) (defaults to: nil)
  • parameters (Object, nil) (defaults to: nil)
  • strict (Boolean, nil) (defaults to: nil)
  • type (Symbol, :function) (defaults to: :function)


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

Instance Attribute Details

#defer_loadingBoolean?

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

Returns:



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

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

#descriptionString?

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#nameString

Returns:

  • (String)


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

required :name, String

#parametersObject?

Returns:

  • (Object, nil)


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

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

#strictBoolean?

Returns:



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

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

#typeSymbol, :function

Returns:

  • (Symbol, :function)


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

required :type, const: :function