Class: OpenAI::Models::Beta::AgentTool::WebSearch::Location

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

Overview

See Also:

  • OpenAI::Models::Beta::AgentTool::WebSearch#location

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 ⇒ Location

Returns a new instance of Location.

Parameters:

  • city —

    The city name.

  • country —

    The two-letter ISO country code, such as US.

  • region —

    The region or state name.

  • timezone —

    The IANA timezone, such as America/Los_Angeles.

  • city: (String, nil)
  • country: (String, nil)
  • region: (String, nil)
  • timezone: (String, nil)


281
282
283
284
285
286
# File 'sig/openai/models/beta/agent_tool.rbs', line 281

def initialize: (
  city: String?,
  country: String?,
  region: String?,
  timezone: String?
) -> void

Instance Attribute Details

#city ⇒ String?

The city name.

Returns:

  • (String, nil)


273
# File 'lib/openai/models/beta/agent_tool.rb', line 273

required :city, String, nil?: true

#country ⇒ String?

The two-letter ISO country code, such as US.

Returns:

  • (String, nil)


279
# File 'lib/openai/models/beta/agent_tool.rb', line 279

required :country, String, nil?: true

#region ⇒ String?

The region or state name.

Returns:

  • (String, nil)


285
# File 'lib/openai/models/beta/agent_tool.rb', line 285

required :region, String, nil?: true

#timezone ⇒ String?

The IANA timezone, such as America/Los_Angeles.

Returns:

  • (String, nil)


291
# File 'lib/openai/models/beta/agent_tool.rb', line 291

required :timezone, String, nil?: true

Instance Method Details

#to_hash ⇒ { city: String?, country: String?, region: String?, timezone: String? }

Returns:

  • ({ city: String?, country: String?, region: String?, timezone: String? })


288
289
290
291
292
293
# File 'sig/openai/models/beta/agent_tool.rbs', line 288

def to_hash: -> {
  city: String?,
  country: String?,
  region: String?,
  timezone: String?
}