Class: Anthropic::Models::Beta::BetaWebSearchTool20250305

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_web_search_tool_20250305.rb

Defined Under Namespace

Modules: AllowedCaller Classes: UserLocation

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Internal::Type::BaseModel

#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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

This class inherits a constructor from Anthropic::Internal::Type::BaseModel

Instance Attribute Details

#allowed_callersArray<Symbol, Anthropic::Models::Beta::BetaWebSearchTool20250305::AllowedCaller>?



23
24
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 23

optional :allowed_callers,
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaWebSearchTool20250305::AllowedCaller] }

#allowed_domainsArray<String>?

If provided, only these domains will be included in results. Cannot be used alongside blocked_domains.

Returns:

  • (Array<String>, nil)


31
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 31

optional :allowed_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#blocked_domainsArray<String>?

If provided, these domains will never appear in results. Cannot be used alongside allowed_domains.

Returns:

  • (Array<String>, nil)


38
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 38

optional :blocked_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#cache_controlAnthropic::Models::Beta::BetaCacheControlEphemeral?

Create a cache control breakpoint at this content block.



44
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 44

optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true

#defer_loadingBoolean?

If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

Returns:



51
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 51

optional :defer_loading, Anthropic::Internal::Type::Boolean

#max_usesInteger?

Maximum number of times the tool can be used in the API request.

Returns:

  • (Integer, nil)


57
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 57

optional :max_uses, Integer, nil?: true

#nameSymbol, :web_search

Name of the tool.

This is how the tool will be called by the model and in tool_use blocks.

Returns:

  • (Symbol, :web_search)


13
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 13

required :name, const: :web_search

#strictBoolean?

Returns:



62
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 62

optional :strict, Anthropic::Internal::Type::Boolean

#typeSymbol, :web_search_20250305

Returns:

  • (Symbol, :web_search_20250305)


18
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 18

required :type, const: :web_search_20250305

#user_locationAnthropic::Models::Beta::BetaWebSearchTool20250305::UserLocation?

Parameters for the user's location. Used to provide more relevant search results.



69
# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 69

optional :user_location, -> { Anthropic::Beta::BetaWebSearchTool20250305::UserLocation }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_web_search_tool_20250305.rb', line 101