Class: OpenAI::Models::Beta::AgentToolParam::WebSearch::Location

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

Overview

See Also:

  • OpenAI::Models::Beta::AgentToolParam::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)


320
321
322
323
324
325
# File 'sig/openai/models/beta/agent_tool_param.rbs', line 320

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

Instance Attribute Details

#city ⇒ String?

The city name.

Returns:

  • (String, nil)


321
# File 'lib/openai/models/beta/agent_tool_param.rb', line 321

optional :city, String, nil?: true

#country ⇒ String?

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

Returns:

  • (String, nil)


327
# File 'lib/openai/models/beta/agent_tool_param.rb', line 327

optional :country, String, nil?: true

#region ⇒ String?

The region or state name.

Returns:

  • (String, nil)


333
# File 'lib/openai/models/beta/agent_tool_param.rb', line 333

optional :region, String, nil?: true

#timezone ⇒ String?

The IANA timezone, such as America/Los_Angeles.

Returns:

  • (String, nil)


339
# File 'lib/openai/models/beta/agent_tool_param.rb', line 339

optional :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? })


327
328
329
330
331
332
# File 'sig/openai/models/beta/agent_tool_param.rbs', line 327

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