Class: OpenAI::Models::Responses::WebSearchTool

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/web_search_tool.rb

Defined Under Namespace

Modules: SearchContextSize, Type Classes: Filters, UserLocation

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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(allowed_domains: nil) ⇒ Object

Some parameter documentations has been truncated, see Filters for more details.

Filters for the search.

Parameters:

  • allowed_domains (Array<String>, nil) (defaults to: nil)

    Allowed domains for the search. If not provided, all domains are allowed.



# File 'lib/openai/models/responses/web_search_tool.rb', line 32


Instance Attribute Details

#filtersOpenAI::Models::Responses::WebSearchTool::Filters?

Filters for the search.



17
# File 'lib/openai/models/responses/web_search_tool.rb', line 17

optional :filters, -> { OpenAI::Responses::WebSearchTool::Filters }, nil?: true

#search_context_sizeSymbol, ...

High level guidance for the amount of context window space to use for the search. One of ‘low`, `medium`, or `high`. `medium` is the default.



24
# File 'lib/openai/models/responses/web_search_tool.rb', line 24

optional :search_context_size, enum: -> { OpenAI::Responses::WebSearchTool::SearchContextSize }

#typeSymbol, OpenAI::Models::Responses::WebSearchTool::Type

The type of the web search tool. One of ‘web_search` or `web_search_2025_08_26`.



11
# File 'lib/openai/models/responses/web_search_tool.rb', line 11

required :type, enum: -> { OpenAI::Responses::WebSearchTool::Type }

#user_locationOpenAI::Models::Responses::WebSearchTool::UserLocation?

The approximate location of the user.



30
# File 'lib/openai/models/responses/web_search_tool.rb', line 30

optional :user_location, -> { OpenAI::Responses::WebSearchTool::UserLocation }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/web_search_tool.rb', line 56