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

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: Tool

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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

Parameters:

  • description —

    A description of the namespace shown to the model.

  • name —

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

  • tools —

    The function/custom tools available inside this namespace.

  • type (defaults to: :namespace) —

    The type of the tool. Always namespace.



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


Instance Attribute Details

#description ⇒ String

A description of the namespace shown to the model.

Returns:

  • (String)


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

required :description, String

#name ⇒ String

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

Returns:

  • (String)


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

required :name, String

#tools ⇒ ::Array[OpenAI::Models::Responses::NamespaceTool::tool]

The function/custom tools available inside this namespace.

Returns:

  • (::Array[OpenAI::Models::Responses::NamespaceTool::tool])


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

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

#type ⇒ :namespace

The type of the tool. Always namespace.

Returns:

  • (:namespace)


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

required :type, const: :namespace

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {