OpenAI::WebSearchPreviewTool
Inherits JSON::Serializable < Reference < Object
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
Constructors
new(pull : JSON::PullParser)
Sourcenew(type_value : WebSearchPreviewToolType = WebSearchPreviewToolType::WebSearchPreview, user_location : WebSearchPreviewToolUserLocation | Nil = nil, search_context_size : SearchContextSize | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
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.
search_context_size=(search_context_size : SearchContextSize | 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
The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11.
type_value=(type_value : WebSearchPreviewToolType)
The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11.
user_location
Sourceuser_location=(user_location : WebSearchPreviewToolUserLocation | Nil)
Source