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

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

Defined Under Namespace

Modules: ContextSize, Mode Classes: Location

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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(city: nil, country: nil, region: nil, timezone: nil) ⇒ Object

Approximate user location used to localize web search results.

Parameters:

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

    The city name.

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

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

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

    The region or state name.

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

    The IANA timezone, such as America/Los_Angeles.



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

Instance Attribute Details

#allowed_domainsArray<String>?

Domains the search may include.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


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

optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true

#context_sizeSymbol, ...

The amount of web search context made available to the model.

Parameters:

  • value (OpenAI::Models::Beta::AgentToolParam::WebSearch::context_size, nil)

Returns:



240
241
242
243
244
245
246
# File 'lib/openai/models/beta/agent_tool_param.rb', line 240

optional(
  :context_size,
  enum: -> {
    OpenAI::Beta::AgentToolParam::WebSearch::ContextSize
  },
  nil?: true
)

#locationOpenAI::Models::Beta::AgentToolParam::WebSearch::Location?

Approximate user location used to localize web search results.

Parameters:

  • value (OpenAI::Beta::AgentToolParam::WebSearch::Location, nil)

Returns:



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

optional :location, -> { OpenAI::Beta::AgentToolParam::WebSearch::Location }, nil?: true

#modeSymbol, ...

The source used for web search results.

Parameters:

  • value (OpenAI::Models::Beta::AgentToolParam::WebSearch::mode, nil)

Returns:



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

optional :mode, enum: -> { OpenAI::Beta::AgentToolParam::WebSearch::Mode }, nil?: true

#typeSymbol, :web_search

The type of the object. Always web_search.

Parameters:

  • value (:web_search)

Returns:

  • (Symbol, :web_search)


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

required :type, const: :web_search

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


177
# File 'sig/openai/models/beta/agent_tool_param.rbs', line 177

def to_hash: -> {