class

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(type_value : WebSearchPreviewToolType = WebSearchPreviewToolType::WebSearchPreview, user_location : WebSearchPreviewToolUserLocation | Nil = nil, search_context_size : SearchContextSize | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance 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.

Source
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.

Source
type_value

The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11.

Source
type_value=(type_value : WebSearchPreviewToolType)

The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11.

Source
user_location
Source
user_location=(user_location : WebSearchPreviewToolUserLocation | Nil)
Source