Class: OpenAI::Models::Beta::PersistedAgentToolParam::WebSearch

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/persisted_agent_tool_param.rb,
sig/openai/models/beta/persisted_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

Parameters:

  • allowed_domains

    Domains the search may include.

  • context_size

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

  • location

    Approximate location used to localize search results.

  • mode

    The source used for web search results. Defaults to live.

  • type

    The type of the object. Always web_search.



# File 'lib/openai/models/beta/persisted_agent_tool_param.rb', line 256


Instance Attribute Details

#allowed_domains::Array[String]?

Domains the search may include.

Returns:

  • (::Array[String], nil)


232
# File 'lib/openai/models/beta/persisted_agent_tool_param.rb', line 232

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

#context_sizeOpenAI::Models::Beta::PersistedAgentToolParam::WebSearch::context_size?

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

Returns:

  • (OpenAI::Models::Beta::PersistedAgentToolParam::WebSearch::context_size, nil)


238
239
240
241
242
# File 'lib/openai/models/beta/persisted_agent_tool_param.rb', line 238

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

#locationOpenAI::Beta::PersistedAgentToolParam::WebSearch::Location?

Approximate location used to localize search results.

Returns:

  • (OpenAI::Beta::PersistedAgentToolParam::WebSearch::Location, nil)


248
# File 'lib/openai/models/beta/persisted_agent_tool_param.rb', line 248

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

#modeOpenAI::Models::Beta::PersistedAgentToolParam::WebSearch::mode?

The source used for web search results. Defaults to live.

Returns:

  • (OpenAI::Models::Beta::PersistedAgentToolParam::WebSearch::mode, nil)


254
# File 'lib/openai/models/beta/persisted_agent_tool_param.rb', line 254

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

#type:web_search

The type of the object. Always web_search.

Returns:

  • (:web_search)


226
# File 'lib/openai/models/beta/persisted_agent_tool_param.rb', line 226

required :type, const: :web_search

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/persisted_agent_tool_param.rb', line 284


Instance Method Details

#to_hash{

Returns:

  • ({)


251
# File 'sig/openai/models/beta/persisted_agent_tool_param.rbs', line 251

def to_hash: -> {