Class: OpenAI::Models::Beta::PersistedAgentTool::WebSearch

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/persisted_agent_tool.rb,
sig/openai/models/beta/persisted_agent_tool.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:, country:, region:, timezone:) ⇒ Object

Approximate user location used to localize web search results.

Parameters:

  • city (String, nil)

    The city name.

  • country (String, nil)

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

  • region (String, nil)

    The region or state name.

  • timezone (String, nil)

    The IANA timezone, such as America/Los_Angeles.



# File 'lib/openai/models/beta/persisted_agent_tool.rb', line 235

Instance Attribute Details

#allowed_domainsArray<String>?

Allowed search domains, or null when the search is unrestricted.

Parameters:

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

Returns:

  • (Array<String>, nil)


209
# File 'lib/openai/models/beta/persisted_agent_tool.rb', line 209

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

#context_sizeSymbol, OpenAI::Models::Beta::PersistedAgentTool::WebSearch::ContextSize

The amount of search context made available to the model. Defaults to medium.

Parameters:

  • value (OpenAI::Models::Beta::PersistedAgentTool::WebSearch::context_size)

Returns:



215
# File 'lib/openai/models/beta/persisted_agent_tool.rb', line 215

required :context_size, enum: -> { OpenAI::Beta::PersistedAgentTool::WebSearch::ContextSize }

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

Approximate user location used to localize web search results.

Parameters:

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

Returns:



221
# File 'lib/openai/models/beta/persisted_agent_tool.rb', line 221

required :location, -> { OpenAI::Beta::PersistedAgentTool::WebSearch::Location }, nil?: true

#modeSymbol, OpenAI::Models::Beta::PersistedAgentTool::WebSearch::Mode

The source used for web search results.

Parameters:

  • value (OpenAI::Models::Beta::PersistedAgentTool::WebSearch::mode)

Returns:



227
# File 'lib/openai/models/beta/persisted_agent_tool.rb', line 227

required :mode, enum: -> { OpenAI::Beta::PersistedAgentTool::WebSearch::Mode }

#typeSymbol, :web_search

The type of the object. Always web_search.

Parameters:

  • value (:web_search)

Returns:

  • (Symbol, :web_search)


233
# File 'lib/openai/models/beta/persisted_agent_tool.rb', line 233

required :type, const: :web_search

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/persisted_agent_tool.rb', line 263

Instance Method Details

#to_hash{

Returns:

  • ({)


168
# File 'sig/openai/models/beta/persisted_agent_tool.rbs', line 168

def to_hash: -> {