Class: Anthropic::Models::Beta::BetaToolChoiceTool

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_tool_choice_tool.rb,
sig/anthropic/models/beta/beta_tool_choice_tool.rbs

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 ⇒ BetaToolChoiceTool

Returns a new instance of BetaToolChoiceTool.

Parameters:

  • name: (String)
  • disable_parallel_tool_use: (Boolean)
  • type: (:tool)


18
19
20
21
22
# File 'sig/anthropic/models/beta/beta_tool_choice_tool.rbs', line 18

def initialize: (
  name: String,
  ?disable_parallel_tool_use: bool,
  ?type: :tool
) -> void

Instance Attribute Details

#disable_parallel_tool_use ⇒ Boolean?

Whether to disable parallel tool use.

Defaults to false. If set to true, the model will output exactly one tool use.

Parameters:

Returns:



25
# File 'lib/anthropic/models/beta/beta_tool_choice_tool.rb', line 25

optional :disable_parallel_tool_use, Anthropic::Internal::Type::Boolean

#name ⇒ String

The name of the tool to use.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/anthropic/models/beta/beta_tool_choice_tool.rb', line 11

required :name, String

#type ⇒ Symbol, :tool

Parameters:

  • value (:tool)

Returns:

  • (Symbol, :tool)


16
# File 'lib/anthropic/models/beta/beta_tool_choice_tool.rb', line 16

required :type, const: :tool

Instance Method Details

#to_hash ⇒ { name: String, type: :tool, disable_parallel_tool_use: bool }

Returns:

  • ({ name: String, type: :tool, disable_parallel_tool_use: bool })


24
25
26
27
28
# File 'sig/anthropic/models/beta/beta_tool_choice_tool.rbs', line 24

def to_hash: -> {
  name: String,
  type: :tool,
  disable_parallel_tool_use: bool
}