Class: OpenAI::Models::Responses::NamespaceTool

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

Defined Under Namespace

Modules: Tool

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(description:, name:, tools:, type: :namespace) ⇒ Object

Groups function/custom tools under a shared namespace.

Parameters:

  • A description of the namespace shown to the model.

  • The namespace name used in tool calls (for example, crm).

  • The function/custom tools available inside this namespace.

  • (defaults to: :namespace)

    The type of the tool. Always namespace.



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


Instance Attribute Details

#descriptionString

A description of the namespace shown to the model.

Returns:



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

required :description, String

#nameString

The namespace name used in tool calls (for example, crm).

Returns:



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

required :name, String

#toolsArray<OpenAI::Models::Responses::NamespaceTool::Tool::Function, OpenAI::Models::Responses::CustomTool>

The function/custom tools available inside this namespace.

Returns:



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

required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::NamespaceTool::Tool] }

#typeSymbol, :namespace

The type of the tool. Always namespace.

Returns:



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

required :type, const: :namespace