OpenAI::WebSearchTool
Inherits JSON::Serializable < Reference < Object
Search the Internet for sources related to the prompt. Learn more about the web search tool.
Constructors
new(pull : JSON::PullParser)
Sourcenew(type_value : WebSearchToolType = WebSearchToolType::WebSearch, filters : WebSearchToolFilters | Nil = nil, user_location : WebSearchApproximateLocation | Nil = nil, search_context_size : WebSearchToolSearchContextSize | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
filters
Sourcefilters=(filters : WebSearchToolFilters | Nil)
Sourcesearch_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.
search_context_size=(search_context_size : WebSearchToolSearchContextSize | Nil)
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.
type_value=(type_value : WebSearchToolType)
The type of the web search tool. One of web_search or web_search_2025_08_26.
user_location
Sourceuser_location=(user_location : WebSearchApproximateLocation | Nil)
Source