Class: Anthropic::Models::Beta::BetaTool
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaTool
- Defined in:
- lib/anthropic/models/beta/beta_tool.rb
Defined Under Namespace
Modules: AllowedCaller, Type Classes: InputSchema
Instance Attribute Summary collapse
- #allowed_callers ⇒ Array<Symbol, Anthropic::Models::Beta::BetaTool::AllowedCaller>?
-
#cache_control ⇒ Anthropic::Models::Beta::BetaCacheControlEphemeral?
Create a cache control breakpoint at this content block.
-
#defer_loading ⇒ Boolean?
If true, tool will not be included in initial system prompt.
-
#description ⇒ String?
Description of what this tool does.
- #input_examples ⇒ Array<Hash{Symbol=>Object}>?
-
#input_schema ⇒ Anthropic::Models::Beta::BetaTool::InputSchema
JSON schema for this tool's input.
-
#name ⇒ String
Name of the tool.
- #strict ⇒ Boolean?
- #type ⇒ Symbol, ...
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(properties: nil, required: nil, type: :object) ⇒ void
constructor
JSON schema for this tool's input.
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(properties: nil, required: nil, type: :object) ⇒ void
JSON schema for this tool's input.
This defines the shape of the input that your tool accepts and that the model
will produce.
|
|
# File 'lib/anthropic/models/beta/beta_tool.rb', line 70
|
Instance Attribute Details
#allowed_callers ⇒ Array<Symbol, Anthropic::Models::Beta::BetaTool::AllowedCaller>?
27 28 |
# File 'lib/anthropic/models/beta/beta_tool.rb', line 27 optional :allowed_callers, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaTool::AllowedCaller] } |
#cache_control ⇒ Anthropic::Models::Beta::BetaCacheControlEphemeral?
Create a cache control breakpoint at this content block.
34 |
# File 'lib/anthropic/models/beta/beta_tool.rb', line 34 optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true |
#defer_loading ⇒ Boolean?
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
41 |
# File 'lib/anthropic/models/beta/beta_tool.rb', line 41 optional :defer_loading, Anthropic::Internal::Type::Boolean |
#description ⇒ String?
Description of what this tool does.
Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.
52 |
# File 'lib/anthropic/models/beta/beta_tool.rb', line 52 optional :description, String |
#input_examples ⇒ Array<Hash{Symbol=>Object}>?
57 58 |
# File 'lib/anthropic/models/beta/beta_tool.rb', line 57 optional :input_examples, Anthropic::Internal::Type::ArrayOf[Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]] |
#input_schema ⇒ Anthropic::Models::Beta::BetaTool::InputSchema
JSON schema for this tool's input.
This defines the shape of the input that your tool accepts and that the model
will produce.
14 |
# File 'lib/anthropic/models/beta/beta_tool.rb', line 14 required :input_schema, -> { Anthropic::Beta::BetaTool::InputSchema } |
#name ⇒ String
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
22 |
# File 'lib/anthropic/models/beta/beta_tool.rb', line 22 required :name, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/beta_tool.rb', line 128
|