Class: OpenAI::Models::Responses::WebSearchPreviewTool::UserLocation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/web_search_preview_tool.rb,
sig/openai/models/responses/web_search_preview_tool.rbs

Overview

See Also:

  • OpenAI::Models::Responses::WebSearchPreviewTool#user_location

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) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Responses::WebSearchPreviewTool::UserLocation for more details.

The user's location.

Parameters:

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

    Free text input for the city of the user, e.g. San Francisco.

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

    The two-letter ISO country code of t

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

    Free text input for the region of the user, e.g. California.

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

    The IANA timezone of the user

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

    The type of location approximation. Always approximate.



# File 'lib/openai/models/responses/web_search_preview_tool.rb', line 122

Instance Attribute Details

#cityString?

Free text input for the city of the user, e.g. San Francisco.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


100
# File 'lib/openai/models/responses/web_search_preview_tool.rb', line 100

optional :city, String, nil?: true

#countryString?

The two-letter ISO country code of the user, e.g. US.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


107
# File 'lib/openai/models/responses/web_search_preview_tool.rb', line 107

optional :country, String, nil?: true

#regionString?

Free text input for the region of the user, e.g. California.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


113
# File 'lib/openai/models/responses/web_search_preview_tool.rb', line 113

optional :region, String, nil?: true

#timezoneString?

The IANA timezone of the user, e.g. America/Los_Angeles.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


120
# File 'lib/openai/models/responses/web_search_preview_tool.rb', line 120

optional :timezone, String, nil?: true

#typeSymbol, :approximate

The type of location approximation. Always approximate.

Parameters:

  • value (:approximate)

Returns:

  • (Symbol, :approximate)


94
# File 'lib/openai/models/responses/web_search_preview_tool.rb', line 94

required :type, const: :approximate

Instance Method Details

#to_hash{

Returns:

  • ({)


105
# File 'sig/openai/models/responses/web_search_preview_tool.rbs', line 105

def to_hash: -> {