Class: OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation

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

Overview

See Also:

  • OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions#user_location

Defined Under Namespace

Classes: Approximate

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(approximate:, type: :approximate) ⇒ UserLocation

Returns a new instance of UserLocation.

Parameters:

  • approximate —

    Approximate location parameters for the search.

  • type (defaults to: :approximate) —

    The type of location approximation. Always approximate.

  • approximate: (OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate)
  • type: (:approximate) (defaults to: :approximate)


# File 'lib/openai/models/chat/completion_create_params.rb', line 1229

Instance Attribute Details

#approximate ⇒ OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate

Approximate location parameters for the search.

Returns:

  • (OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate)


1218
1219
1220
1221
# File 'lib/openai/models/chat/completion_create_params.rb', line 1218

required(
  :approximate,
  -> { OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate }
)

#type ⇒ :approximate

The type of location approximation. Always approximate.

Returns:

  • (:approximate)


1227
# File 'lib/openai/models/chat/completion_create_params.rb', line 1227

required :type, const: :approximate

Instance Method Details

#to_hash ⇒ { approximate: OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate, ?type: :approximate }

Returns:

  • ({ approximate: OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate, ?type: :approximate })


1185
1186
1187
1188
# File 'sig/openai/models/chat/completion_create_params.rbs', line 1185

def to_hash: -> {
  approximate: OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate,
  ?type: :approximate
}