Class: OpenAI::Models::Responses::ToolSearchOutputNamespaceTool

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/tool_search_output_namespace_tool.rb,
sig/openai/models/responses/tool_search_output_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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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) ⇒ ToolSearchOutputNamespaceTool

Returns a new instance of ToolSearchOutputNamespaceTool.

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 loaded inside this namespace.

  • type (defaults to: :namespace) —

    The type of the tool. Always namespace.

  • description: (String)
  • name: (String)
  • tools: (::Array[OpenAI::Models::Responses::ToolSearchOutputNamespaceTool::tool])
  • type: (:namespace) (defaults to: :namespace)


# File 'lib/openai/models/responses/tool_search_output_namespace_tool.rb', line 34

Instance Attribute Details

#description ⇒ String

A description of the namespace shown to the model.

Returns:

  • (String)


11
# File 'lib/openai/models/responses/tool_search_output_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/tool_search_output_namespace_tool.rb', line 17

required :name, String

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

The function/custom tools loaded inside this namespace.

Returns:

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


23
24
25
26
# File 'lib/openai/models/responses/tool_search_output_namespace_tool.rb', line 23

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

#type ⇒ :namespace

The type of the tool. Always namespace.

Returns:

  • (:namespace)


32
# File 'lib/openai/models/responses/tool_search_output_namespace_tool.rb', line 32

required :type, const: :namespace

Instance Method Details

#to_hash ⇒ { description: String, name: String, tools: ::Array[OpenAI::Models::Responses::ToolSearchOutputNamespaceTool::tool], ?type: :namespace }

Returns:

  • ({ description: String, name: String, tools: ::Array[OpenAI::Models::Responses::ToolSearchOutputNamespaceTool::tool], ?type: :namespace })


40
41
42
43
44
45
# File 'sig/openai/models/responses/tool_search_output_namespace_tool.rbs', line 40

def to_hash: -> {
  description: String,
  name: String,
  tools: ::Array[OpenAI::Models::Responses::ToolSearchOutputNamespaceTool::tool],
  ?type: :namespace
}