Class WebSearchPreviewTool
-
- All Implemented Interfaces:
public final class WebSearchPreviewToolThis 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 classWebSearchPreviewTool.BuilderA builder for WebSearchPreviewTool.
public final classWebSearchPreviewTool.TypeThe type of the web search tool. One of
web_search_previeworweb_search_preview_2025_03_11.public final classWebSearchPreviewTool.SearchContentTypepublic final classWebSearchPreviewTool.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 classWebSearchPreviewTool.UserLocationThe user's location.
-
Method Summary
-
-
Method Detail
-
type
final WebSearchPreviewTool.Type type()
The type of the web search tool. One of
web_search_previeworweb_search_preview_2025_03_11.
-
searchContentTypes
final Optional<List<WebSearchPreviewTool.SearchContentType>> searchContentTypes()
-
searchContextSize
final Optional<WebSearchPreviewTool.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<WebSearchPreviewTool.UserLocation> userLocation()
The user's location.
-
_type
final JsonField<WebSearchPreviewTool.Type> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
-
_searchContentTypes
final JsonField<List<WebSearchPreviewTool.SearchContentType>> _searchContentTypes()
Returns the raw JSON value of searchContentTypes.
Unlike searchContentTypes, this method doesn't throw if the JSON field has an unexpected type.
-
_searchContextSize
final JsonField<WebSearchPreviewTool.SearchContextSize> _searchContextSize()
Returns the raw JSON value of searchContextSize.
Unlike searchContextSize, this method doesn't throw if the JSON field has an unexpected type.
-
_userLocation
final JsonField<WebSearchPreviewTool.UserLocation> _userLocation()
Returns the raw JSON value of userLocation.
Unlike userLocation, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final WebSearchPreviewTool.Builder toBuilder()
-
validate
final WebSearchPreviewTool validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static WebSearchPreviewTool.Builder builder()
Returns a mutable builder for constructing an instance of WebSearchPreviewTool.
The following fields are required:
.type()
-
-
-
-