Class: Anthropic::Models::WebSearchTool20250305::UserLocation

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

Overview

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

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(city: nil, country: nil, region: nil, timezone: nil, type: :approximate) ⇒ void

Some parameter documentations has been truncated, see Anthropic::Models::WebSearchTool20250305::UserLocation for more details.

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

Parameters:

  • city (String, nil) (defaults to: nil)

    The city of the user.

  • country (String, nil) (defaults to: nil)

    The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha

  • region (String, nil) (defaults to: nil)

    The region of the user.

  • timezone (String, nil) (defaults to: nil)

    The IANA timezone of the user.

  • type (Symbol, :approximate) (defaults to: :approximate)


# File 'lib/anthropic/models/web_search_tool_20250305.rb', line 103


Instance Attribute Details

#cityString?

The city of the user.

Returns:

  • (String, nil)


81
# File 'lib/anthropic/models/web_search_tool_20250305.rb', line 81

optional :city, String, nil?: true

#countryString?

The two letter ISO country code of the user.

Returns:

  • (String, nil)


89
# File 'lib/anthropic/models/web_search_tool_20250305.rb', line 89

optional :country, String, nil?: true

#regionString?

The region of the user.

Returns:

  • (String, nil)


95
# File 'lib/anthropic/models/web_search_tool_20250305.rb', line 95

optional :region, String, nil?: true

#timezoneString?

The IANA timezone of the user.

Returns:

  • (String, nil)


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

optional :timezone, String, nil?: true

#typeSymbol, :approximate

Returns:

  • (Symbol, :approximate)


75
# File 'lib/anthropic/models/web_search_tool_20250305.rb', line 75

required :type, const: :approximate