Class: Anthropic::Models::ToolUseBlock
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::ToolUseBlock
- Defined in:
- lib/anthropic/models/tool_use_block.rb,
sig/anthropic/models/tool_use_block.rbs
Defined Under Namespace
Modules: Caller
Constant Summary collapse
- Anthropic =
Instance Attribute Summary collapse
- #caller_ ⇒ Anthropic::Models::DirectCaller, ...
- #id ⇒ String
- #input ⇒ Object
- #name ⇒ String
-
#toolset_name ⇒ String?
For a toolset member tool_use, the toolset family.
- #type ⇒ Symbol, :tool_use
Instance Method Summary collapse
-
#initialize(id:, caller_:, input:, name:, toolset_name: nil, type: :tool_use) ⇒ ToolUseBlock
constructor
A new instance of ToolUseBlock.
- #to_hash ⇒ { id: String, caller_: Anthropic::Models::ToolUseBlock::caller_, input: ::Hash[Symbol, top], name: String, type: :tool_use, toolset_name: String? }
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(id:, caller_:, input:, name:, toolset_name: nil, type: :tool_use) ⇒ ToolUseBlock
Returns a new instance of ToolUseBlock.
|
|
# File 'lib/anthropic/models/tool_use_block.rb', line 51
|
Instance Attribute Details
#caller_ ⇒ Anthropic::Models::DirectCaller, ...
14 |
# File 'lib/anthropic/models/tool_use_block.rb', line 14 required :caller_, union: -> { Anthropic::ToolUseBlock::Caller }, api_name: :caller |
#id ⇒ String
9 |
# File 'lib/anthropic/models/tool_use_block.rb', line 9 required :id, String |
#input ⇒ Object
19 |
# File 'lib/anthropic/models/tool_use_block.rb', line 19 required :input, Anthropic::Internal::Type::Unknown |
#name ⇒ String
24 |
# File 'lib/anthropic/models/tool_use_block.rb', line 24 required :name, String |
#toolset_name ⇒ String?
For a toolset member tool_use, the toolset family.
35 |
# File 'lib/anthropic/models/tool_use_block.rb', line 35 optional :toolset_name, String, nil?: true |
#type ⇒ Symbol, :tool_use
29 |
# File 'lib/anthropic/models/tool_use_block.rb', line 29 required :type, const: :tool_use |
Instance Method Details
#to_hash ⇒ { id: String, caller_: Anthropic::Models::ToolUseBlock::caller_, input: ::Hash[Symbol, top], name: String, type: :tool_use, toolset_name: String? }
35 36 37 38 39 40 41 42 |
# File 'sig/anthropic/models/tool_use_block.rbs', line 35
def to_hash: -> {
id: String,
caller_: Anthropic::Models::ToolUseBlock::caller_,
input: ::Hash[Symbol, top],
name: String,
type: :tool_use,
toolset_name: String?
}
|