Class: OpenAI::Models::Beta::BetaWebSearchTool
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::BetaWebSearchTool
- Defined in:
- lib/openai/models/beta/beta_web_search_tool.rb,
sig/openai/models/beta/beta_web_search_tool.rbs
Defined Under Namespace
Modules: SearchContextSize, Type Classes: Filters, UserLocation
Instance Attribute Summary collapse
-
#external_web_access ⇒ Boolean?
Allow live internet access for web search.
-
#filters ⇒ OpenAI::Beta::BetaWebSearchTool::Filters?
Filters for the search.
-
#search_context_size ⇒ OpenAI::Models::Beta::BetaWebSearchTool::search_context_size?
High level guidance for the amount of context window space to use for the search.
-
#type ⇒ OpenAI::Models::Beta::BetaWebSearchTool::type_
The type of the web search tool.
-
#user_location ⇒ OpenAI::Beta::BetaWebSearchTool::UserLocation?
The approximate location of the user.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allowed_domains: nil) ⇒ BetaWebSearchTool
constructor
A new instance of BetaWebSearchTool.
- #to_hash ⇒ { type: OpenAI::Models::Beta::BetaWebSearchTool::type_, ?external_web_access: bool, ?filters: OpenAI::Beta::BetaWebSearchTool::Filters?, ?search_context_size: OpenAI::Models::Beta::BetaWebSearchTool::search_context_size, ?user_location: OpenAI::Beta::BetaWebSearchTool::UserLocation? }
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(allowed_domains: nil) ⇒ BetaWebSearchTool
Returns a new instance of BetaWebSearchTool.
|
|
# File 'lib/openai/models/beta/beta_web_search_tool.rb', line 42
|
Instance Attribute Details
#external_web_access ⇒ Boolean?
Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.
19 |
# File 'lib/openai/models/beta/beta_web_search_tool.rb', line 19 optional :external_web_access, OpenAI::Internal::Type::Boolean |
#filters ⇒ OpenAI::Beta::BetaWebSearchTool::Filters?
Filters for the search.
25 |
# File 'lib/openai/models/beta/beta_web_search_tool.rb', line 25 optional :filters, -> { OpenAI::Beta::BetaWebSearchTool::Filters }, nil?: true |
#search_context_size ⇒ OpenAI::Models::Beta::BetaWebSearchTool::search_context_size?
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.
32 |
# File 'lib/openai/models/beta/beta_web_search_tool.rb', line 32 optional :search_context_size, enum: -> { OpenAI::Beta::BetaWebSearchTool::SearchContextSize } |
#type ⇒ OpenAI::Models::Beta::BetaWebSearchTool::type_
The type of the web search tool. One of web_search or web_search_2025_08_26.
11 |
# File 'lib/openai/models/beta/beta_web_search_tool.rb', line 11 required :type, enum: -> { OpenAI::Beta::BetaWebSearchTool::Type } |
#user_location ⇒ OpenAI::Beta::BetaWebSearchTool::UserLocation?
The approximate location of the user. If omitted or null, defaults to the United
States. To avoid this fallback, pass {"type": "approximate"} without location
fields. To localize results, provide the relevant location fields.
40 |
# File 'lib/openai/models/beta/beta_web_search_tool.rb', line 40 optional :user_location, -> { OpenAI::Beta::BetaWebSearchTool::UserLocation }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/beta/beta_web_search_tool.rb', line 75
|
Instance Method Details
#to_hash ⇒ { type: OpenAI::Models::Beta::BetaWebSearchTool::type_, ?external_web_access: bool, ?filters: OpenAI::Beta::BetaWebSearchTool::Filters?, ?search_context_size: OpenAI::Models::Beta::BetaWebSearchTool::search_context_size, ?user_location: OpenAI::Beta::BetaWebSearchTool::UserLocation? }
70 71 72 73 74 75 76 |
# File 'sig/openai/models/beta/beta_web_search_tool.rbs', line 70
def to_hash: -> {
type: OpenAI::Models::Beta::BetaWebSearchTool::type_,
?external_web_access: bool,
?filters: OpenAI::Beta::BetaWebSearchTool::Filters?,
?search_context_size: OpenAI::Models::Beta::BetaWebSearchTool::search_context_size,
?user_location: OpenAI::Beta::BetaWebSearchTool::UserLocation?
}
|