Class: Anthropic::Models::ToolUseBlockParam
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::ToolUseBlockParam
- Defined in:
- lib/anthropic/models/tool_use_block_param.rb,
sig/anthropic/models/tool_use_block_param.rbs
Defined Under Namespace
Modules: Caller
Constant Summary collapse
- Anthropic =
Instance Attribute Summary collapse
-
#cache_control ⇒ Anthropic::Models::CacheControlEphemeral?
Create a cache control breakpoint at this content block.
- #caller_ ⇒ Anthropic::Models::DirectCaller, ...
- #id ⇒ String
- #input ⇒ Hash{Symbol=>Object}
- #name ⇒ String
-
#toolset_name ⇒ String?
For a toolset member tool_use, the toolset family this member belongs to.
- #type ⇒ Symbol, :tool_use
Instance Method Summary collapse
-
#initialize(id:, input:, name:, cache_control: nil, caller_: nil, toolset_name: nil, type: :tool_use) ⇒ ToolUseBlockParam
constructor
A new instance of ToolUseBlockParam.
- #to_hash ⇒ { id: String, input: ::Hash[Symbol, top], name: String, type: :tool_use, cache_control: Anthropic::CacheControlEphemeral?, caller_: Anthropic::Models::ToolUseBlockParam::caller_, 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:, input:, name:, cache_control: nil, caller_: nil, toolset_name: nil, type: :tool_use) ⇒ ToolUseBlockParam
Returns a new instance of ToolUseBlockParam.
|
|
# File 'lib/anthropic/models/tool_use_block_param.rb', line 43
|
Instance Attribute Details
#cache_control ⇒ Anthropic::Models::CacheControlEphemeral?
Create a cache control breakpoint at this content block.
30 |
# File 'lib/anthropic/models/tool_use_block_param.rb', line 30 optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true |
#caller_ ⇒ Anthropic::Models::DirectCaller, ...
35 |
# File 'lib/anthropic/models/tool_use_block_param.rb', line 35 optional :caller_, union: -> { Anthropic::ToolUseBlockParam::Caller }, api_name: :caller |
#id ⇒ String
9 |
# File 'lib/anthropic/models/tool_use_block_param.rb', line 9 required :id, String |
#input ⇒ Hash{Symbol=>Object}
14 |
# File 'lib/anthropic/models/tool_use_block_param.rb', line 14 required :input, Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown] |
#name ⇒ String
19 |
# File 'lib/anthropic/models/tool_use_block_param.rb', line 19 required :name, String |
#toolset_name ⇒ String?
For a toolset member tool_use, the toolset family this member belongs to.
41 |
# File 'lib/anthropic/models/tool_use_block_param.rb', line 41 optional :toolset_name, String, nil?: true |
#type ⇒ Symbol, :tool_use
24 |
# File 'lib/anthropic/models/tool_use_block_param.rb', line 24 required :type, const: :tool_use |
Instance Method Details
#to_hash ⇒ { id: String, input: ::Hash[Symbol, top], name: String, type: :tool_use, cache_control: Anthropic::CacheControlEphemeral?, caller_: Anthropic::Models::ToolUseBlockParam::caller_, toolset_name: String? }
43 44 45 46 47 48 49 50 51 |
# File 'sig/anthropic/models/tool_use_block_param.rbs', line 43
def to_hash: -> {
id: String,
input: ::Hash[Symbol, top],
name: String,
type: :tool_use,
cache_control: Anthropic::CacheControlEphemeral?,
caller_: Anthropic::Models::ToolUseBlockParam::caller_,
toolset_name: String?
}
|