Class BetaWebSearchTool
-
- All Implemented Interfaces:
public final class BetaWebSearchToolSearch the Internet for sources related to the prompt. Learn more about the web search tool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaWebSearchTool.BuilderA builder for BetaWebSearchTool.
public final classBetaWebSearchTool.TypeThe type of the web search tool. One of
web_searchorweb_search_2025_08_26.public final classBetaWebSearchTool.FiltersFilters for the search.
public final classBetaWebSearchTool.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 classBetaWebSearchTool.UserLocationThe approximate location of the user.
-
Method Summary
Modifier and Type Method Description final BetaWebSearchTool.Typetype()The type of the web search tool. final Optional<BetaWebSearchTool.Filters>filters()Filters for the search. final Optional<BetaWebSearchTool.SearchContextSize>searchContextSize()High level guidance for the amount of context window space to use for the search. final Optional<BetaWebSearchTool.UserLocation>userLocation()The approximate location of the user. final JsonField<BetaWebSearchTool.Type>_type()Returns the raw JSON value of type. final JsonField<BetaWebSearchTool.Filters>_filters()Returns the raw JSON value of filters. final JsonField<BetaWebSearchTool.SearchContextSize>_searchContextSize()Returns the raw JSON value of searchContextSize. final JsonField<BetaWebSearchTool.UserLocation>_userLocation()Returns the raw JSON value of userLocation. final Map<String, JsonValue>_additionalProperties()final BetaWebSearchTool.BuildertoBuilder()final BetaWebSearchToolvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaWebSearchTool.Builderbuilder()Returns a mutable builder for constructing an instance of BetaWebSearchTool. -
-
Method Detail
-
type
final BetaWebSearchTool.Type type()
The type of the web search tool. One of
web_searchorweb_search_2025_08_26.
-
filters
final Optional<BetaWebSearchTool.Filters> filters()
Filters for the search.
-
searchContextSize
final Optional<BetaWebSearchTool.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<BetaWebSearchTool.UserLocation> userLocation()
The approximate location of the user.
-
_type
final JsonField<BetaWebSearchTool.Type> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
-
_filters
final JsonField<BetaWebSearchTool.Filters> _filters()
Returns the raw JSON value of filters.
Unlike filters, this method doesn't throw if the JSON field has an unexpected type.
-
_searchContextSize
final JsonField<BetaWebSearchTool.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<BetaWebSearchTool.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 BetaWebSearchTool.Builder toBuilder()
-
validate
final BetaWebSearchTool 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 BetaWebSearchTool.Builder builder()
Returns a mutable builder for constructing an instance of BetaWebSearchTool.
The following fields are required:
.type()
-
-
-
-