Class BetaWebSearchTool.Builder
-
- All Implemented Interfaces:
public final class BetaWebSearchTool.BuilderA builder for BetaWebSearchTool.
-
-
Method Summary
-
-
Method Detail
-
type
final BetaWebSearchTool.Builder type(BetaWebSearchTool.Type type)
The type of the web search tool. One of
web_searchorweb_search_2025_08_26.
-
type
final BetaWebSearchTool.Builder type(JsonField<BetaWebSearchTool.Type> type)
Sets Builder.type to an arbitrary JSON value.
You should usually call Builder.type with a well-typed Type value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
filters
final BetaWebSearchTool.Builder filters(BetaWebSearchTool.Filters filters)
Filters for the search.
-
filters
final BetaWebSearchTool.Builder filters(Optional<BetaWebSearchTool.Filters> filters)
Alias for calling Builder.filters with
filters.orElse(null).
-
filters
final BetaWebSearchTool.Builder filters(JsonField<BetaWebSearchTool.Filters> filters)
Sets Builder.filters to an arbitrary JSON value.
You should usually call Builder.filters with a well-typed Filters value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
searchContextSize
final BetaWebSearchTool.Builder searchContextSize(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.
-
searchContextSize
final BetaWebSearchTool.Builder searchContextSize(JsonField<BetaWebSearchTool.SearchContextSize> searchContextSize)
Sets Builder.searchContextSize to an arbitrary JSON value.
You should usually call Builder.searchContextSize with a well-typed SearchContextSize value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
userLocation
final BetaWebSearchTool.Builder userLocation(BetaWebSearchTool.UserLocation userLocation)
The approximate location of the user.
-
userLocation
final BetaWebSearchTool.Builder userLocation(Optional<BetaWebSearchTool.UserLocation> userLocation)
Alias for calling Builder.userLocation with
userLocation.orElse(null).
-
userLocation
final BetaWebSearchTool.Builder userLocation(JsonField<BetaWebSearchTool.UserLocation> userLocation)
Sets Builder.userLocation to an arbitrary JSON value.
You should usually call Builder.userLocation with a well-typed UserLocation value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaWebSearchTool.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaWebSearchTool.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaWebSearchTool.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaWebSearchTool.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaWebSearchTool.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaWebSearchTool build()
Returns an immutable instance of BetaWebSearchTool.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.type()
-
-
-
-