Class: Anthropic::Models::WebFetchTool20260318
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::WebFetchTool20260318
- Defined in:
- lib/anthropic/models/web_fetch_tool_20260318.rb,
sig/anthropic/models/web_fetch_tool_20260318.rbs
Defined Under Namespace
Modules: AllowedCaller, ResponseInclusion
Instance Attribute Summary collapse
- #allowed_callers ⇒ Array<Symbol, Anthropic::Models::WebFetchTool20260318::AllowedCaller>?
-
#allowed_domains ⇒ Array<String>?
List of domains to allow fetching from.
-
#blocked_domains ⇒ Array<String>?
List of domains to block fetching from.
-
#cache_control ⇒ Anthropic::Models::CacheControlEphemeral?
Create a cache control breakpoint at this content block.
-
#citations ⇒ Anthropic::Models::CitationsConfigParam?
Citations configuration for fetched documents.
-
#defer_loading ⇒ Boolean?
If true, tool will not be included in initial system prompt.
-
#max_content_tokens ⇒ Integer?
Maximum number of tokens used by including web page text content in the context.
-
#max_uses ⇒ Integer?
Maximum number of times the tool can be used in the API request.
-
#name ⇒ Symbol, :web_fetch
Name of the tool.
-
#response_inclusion ⇒ Symbol, ...
How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn.
-
#strict ⇒ Boolean?
When true, guarantees schema validation on tool names and inputs.
- #type ⇒ Symbol, :web_fetch_20260318
-
#url_sources ⇒ Anthropic::Models::WebFetchURLSources?
Which sources contribute to the set of URLs web fetch may fetch.
-
#use_cache ⇒ Boolean?
Whether to use cached content.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allowed_callers: nil, allowed_domains: nil, blocked_domains: nil, cache_control: nil, citations: nil, defer_loading: nil, max_content_tokens: nil, max_uses: nil, response_inclusion: nil, strict: nil, url_sources: nil, use_cache: nil, name: :web_fetch, type: :web_fetch_20260318) ⇒ void
constructor
Some parameter documentations has been truncated, see WebFetchTool20260318 for more details.
- #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(allowed_callers: nil, allowed_domains: nil, blocked_domains: nil, cache_control: nil, citations: nil, defer_loading: nil, max_content_tokens: nil, max_uses: nil, response_inclusion: nil, strict: nil, url_sources: nil, use_cache: nil, name: :web_fetch, type: :web_fetch_20260318) ⇒ void
Some parameter documentations has been truncated, see Anthropic::Models::WebFetchTool20260318 for more details.
|
|
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 106
|
Instance Attribute Details
#allowed_callers ⇒ Array<Symbol, Anthropic::Models::WebFetchTool20260318::AllowedCaller>?
22 23 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 22 optional :allowed_callers, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::WebFetchTool20260318::AllowedCaller] } |
#allowed_domains ⇒ Array<String>?
List of domains to allow fetching from
29 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 29 optional :allowed_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#blocked_domains ⇒ Array<String>?
List of domains to block fetching from
35 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 35 optional :blocked_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#cache_control ⇒ Anthropic::Models::CacheControlEphemeral?
Create a cache control breakpoint at this content block.
41 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 41 optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true |
#citations ⇒ Anthropic::Models::CitationsConfigParam?
Citations configuration for fetched documents. Citations are disabled by default.
48 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 48 optional :citations, -> { Anthropic::CitationsConfigParam }, 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.
55 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 55 optional :defer_loading, Anthropic::Internal::Type::Boolean |
#max_content_tokens ⇒ Integer?
Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
62 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 62 optional :max_content_tokens, Integer, nil?: true |
#max_uses ⇒ Integer?
Maximum number of times the tool can be used in the API request.
68 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 68 optional :max_uses, Integer, nil?: true |
#name ⇒ Symbol, :web_fetch
Name of the tool.
This is how the tool will be called by the model and in tool_use blocks.
12 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 12 required :name, const: :web_fetch |
#response_inclusion ⇒ Symbol, ...
How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.
79 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 79 optional :response_inclusion, enum: -> { Anthropic::WebFetchTool20260318::ResponseInclusion } |
#strict ⇒ Boolean?
When true, guarantees schema validation on tool names and inputs
85 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 85 optional :strict, Anthropic::Internal::Type::Boolean |
#type ⇒ Symbol, :web_fetch_20260318
17 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 17 required :type, const: :web_fetch_20260318 |
#url_sources ⇒ Anthropic::Models::WebFetchURLSources?
Which sources contribute to the set of URLs web fetch may fetch.
Each key is a tagged variant: user_input is all or none; the two tool
filters are all, none, only (only the named tools' results) or except
(every result but the named tools'). A named tool must be declared in this
request's tools[].
96 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 96 optional :url_sources, -> { Anthropic::WebFetchURLSources }, nil?: true |
#use_cache ⇒ Boolean?
Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
104 |
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 104 optional :use_cache, Anthropic::Internal::Type::Boolean |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/web_fetch_tool_20260318.rb', line 153
|
Instance Method Details
#to_hash ⇒ {
81 |
# File 'sig/anthropic/models/web_fetch_tool_20260318.rbs', line 81
def to_hash: -> {
|