Class WebSearchTool.Builder
-
- All Implemented Interfaces:
public final class WebSearchTool.Builder
A builder for WebSearchTool.
-
-
Method Summary
-
-
Method Detail
-
type
final WebSearchTool.Builder type(WebSearchTool.Type type)
The type of the web search tool. One of:
web_search_preview
web_search_preview_2025_03_11
-
type
final WebSearchTool.Builder type(JsonField<WebSearchTool.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.
-
searchContextSize
final WebSearchTool.Builder searchContextSize(WebSearchTool.SearchContextSize searchContextSize)
High level guidance for the amount of context window space to use for the search. One of
low
,medium
, orhigh
.medium
is the default.
-
searchContextSize
final WebSearchTool.Builder searchContextSize(JsonField<WebSearchTool.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 WebSearchTool.Builder userLocation(WebSearchTool.UserLocation userLocation)
-
userLocation
final WebSearchTool.Builder userLocation(Optional<WebSearchTool.UserLocation> userLocation)
Alias for calling Builder.userLocation with
userLocation.orElse(null)
.
-
userLocation
final WebSearchTool.Builder userLocation(JsonField<WebSearchTool.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 WebSearchTool.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final WebSearchTool.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final WebSearchTool.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final WebSearchTool.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final WebSearchTool.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final WebSearchTool build()
Returns an immutable instance of WebSearchTool.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.type()
-
-
-
-