Class: Anthropic::Models::Beta::BetaResponseTool
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaResponseTool
- Defined in:
- lib/anthropic/models/beta/beta_response_tool.rb,
sig/anthropic/models/beta/beta_response_tool.rbs
Defined Under Namespace
Modules: AllowedCaller, Type
Instance Attribute Summary collapse
- #allowed_callers ⇒ Array<Symbol, Anthropic::Models::Beta::BetaResponseTool::AllowedCaller>?
-
#defer_loading ⇒ Boolean?
If true, tool will not be included in initial system prompt.
-
#description ⇒ String?
Description of what this tool does.
-
#eager_input_streaming ⇒ Boolean?
Enable eager input streaming for this tool.
- #input_examples ⇒ Array<Hash{Symbol=>Object}>?
-
#input_schema ⇒ Anthropic::Models::Beta::BetaResponseToolInputSchema
JSON schema for this tool's input.
-
#name ⇒ String
Name of the tool.
-
#strict ⇒ Boolean?
When true, guarantees schema validation on tool names and inputs.
- #type ⇒ Symbol, ...
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input_schema:, name:, allowed_callers: nil, defer_loading: nil, description: nil, eager_input_streaming: nil, input_examples: nil, strict: nil, type: nil) ⇒ void
constructor
A custom tool definition, as sent.
- #to_hash ⇒ {
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(input_schema:, name:, allowed_callers: nil, defer_loading: nil, description: nil, eager_input_streaming: nil, input_examples: nil, strict: nil, type: nil) ⇒ void
A custom tool definition, as sent.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaResponseTool for more details.
|
|
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 75
|
Instance Attribute Details
#allowed_callers ⇒ Array<Symbol, Anthropic::Models::Beta::BetaResponseTool::AllowedCaller>?
27 28 |
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 27 optional :allowed_callers, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaResponseTool::AllowedCaller] } |
#defer_loading ⇒ Boolean?
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
35 |
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 35 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.
46 |
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 46 optional :description, String |
#eager_input_streaming ⇒ Boolean?
Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers.
56 |
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 56 optional :eager_input_streaming, Anthropic::Internal::Type::Boolean, nil?: true |
#input_examples ⇒ Array<Hash{Symbol=>Object}>?
61 62 |
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 61 optional :input_examples, Anthropic::Internal::Type::ArrayOf[Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]] |
#input_schema ⇒ Anthropic::Models::Beta::BetaResponseToolInputSchema
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_response_tool.rb', line 14 required :input_schema, -> { Anthropic::Beta::BetaResponseToolInputSchema } |
#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_response_tool.rb', line 22 required :name, String |
#strict ⇒ Boolean?
When true, guarantees schema validation on tool names and inputs
68 |
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 68 optional :strict, Anthropic::Internal::Type::Boolean |
#type ⇒ Symbol, ...
73 |
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 73 optional :type, enum: -> { Anthropic::Beta::BetaResponseTool::Type }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/beta_response_tool.rb', line 114
|
Instance Method Details
#to_hash ⇒ {
64 |
# File 'sig/anthropic/models/beta/beta_response_tool.rbs', line 64
def to_hash: -> {
|