Class WebSearchTool
-
- All Implemented Interfaces:
public final class WebSearchToolThis tool searches the web for relevant results to use in a response. Learn more about the web search tool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classWebSearchTool.BuilderA builder for WebSearchTool.
public final classWebSearchTool.TypeThe type of the web search tool. One of:
web_search_previewweb_search_preview_2025_03_11
public final classWebSearchTool.SearchContextSizeHigh level guidance for the amount of context window space to use for the search. One of
low,medium, orhigh.mediumis the default.public final classWebSearchTool.UserLocation
-
Method Summary
Modifier and Type Method Description final WebSearchTool.Typetype()The type of the web search tool. final Optional<WebSearchTool.SearchContextSize>searchContextSize()High level guidance for the amount of context window space to use for the search. final Optional<WebSearchTool.UserLocation>userLocation()final JsonField<WebSearchTool.Type>_type()The type of the web search tool. final JsonField<WebSearchTool.SearchContextSize>_searchContextSize()High level guidance for the amount of context window space to use for the search. final JsonField<WebSearchTool.UserLocation>_userLocation()final Map<String, JsonValue>_additionalProperties()final WebSearchToolvalidate()final WebSearchTool.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static WebSearchTool.Builderbuilder()Returns a mutable builder for constructing an instance of WebSearchTool. -
-
Method Detail
-
type
final WebSearchTool.Type type()
The type of the web search tool. One of:
web_search_previewweb_search_preview_2025_03_11
-
searchContextSize
final Optional<WebSearchTool.SearchContextSize> searchContextSize()
High level guidance for the amount of context window space to use for the search. One of
low,medium, orhigh.mediumis the default.
-
userLocation
final Optional<WebSearchTool.UserLocation> userLocation()
-
_type
final JsonField<WebSearchTool.Type> _type()
The type of the web search tool. One of:
web_search_previewweb_search_preview_2025_03_11
-
_searchContextSize
final JsonField<WebSearchTool.SearchContextSize> _searchContextSize()
High level guidance for the amount of context window space to use for the search. One of
low,medium, orhigh.mediumis the default.
-
_userLocation
final JsonField<WebSearchTool.UserLocation> _userLocation()
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final WebSearchTool validate()
-
toBuilder
final WebSearchTool.Builder toBuilder()
-
builder
final static WebSearchTool.Builder builder()
Returns a mutable builder for constructing an instance of WebSearchTool.
The following fields are required:
.type()
-
-
-
-