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_with_error, 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(approximate:, type: :approximate) ⇒ Object

Parameters:

  • Approximate location parameters for the search.

  • (defaults to: :approximate)

    The type of location approximation. Always approximate.



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

Instance Attribute Details

#approximateOpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate

Approximate location parameters for the search.

Returns:



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

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

#type:approximate

The type of location approximation. Always approximate.

Returns:



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

required :type, const: :approximate

Instance Method Details

#to_hash{

Returns:



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

def to_hash: -> {