Class WebSearchTool20250305
-
- All Implemented Interfaces:
public final class WebSearchTool20250305
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classWebSearchTool20250305.BuilderA builder for WebSearchTool20250305.
public final classWebSearchTool20250305.UserLocationParameters for the user's location. Used to provide more relevant search results.
-
Method Summary
Modifier and Type Method Description final JsonValue_name()Name of the tool. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("web_search_20250305")final Optional<List<String>>allowedDomains()If provided, only these domains will be included in results. final Optional<List<String>>blockedDomains()If provided, these domains will never appear in results. final Optional<CacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<Long>maxUses()Maximum number of times the tool can be used in the API request. final Optional<WebSearchTool20250305.UserLocation>userLocation()Parameters for the user's location. final JsonField<List<String>>_allowedDomains()Returns the raw JSON value of allowedDomains. final JsonField<List<String>>_blockedDomains()Returns the raw JSON value of blockedDomains. final JsonField<CacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final JsonField<Long>_maxUses()Returns the raw JSON value of maxUses. final JsonField<WebSearchTool20250305.UserLocation>_userLocation()Returns the raw JSON value of userLocation. final Map<String, JsonValue>_additionalProperties()final WebSearchTool20250305.BuildertoBuilder()final WebSearchTool20250305validate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static WebSearchTool20250305.Builderbuilder()Returns a mutable builder for constructing an instance of WebSearchTool20250305. -
-
Method Detail
-
_name
final JsonValue _name()
Name of the tool.
This is how the tool will be called by the model and in
tool_useblocks.Expected to always return the following:
JsonValue.from("web_search")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("web_search_20250305")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedDomains
final Optional<List<String>> allowedDomains()
If provided, only these domains will be included in results. Cannot be used alongside
blocked_domains.
-
blockedDomains
final Optional<List<String>> blockedDomains()
If provided, these domains will never appear in results. Cannot be used alongside
allowed_domains.
-
cacheControl
final Optional<CacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
maxUses
final Optional<Long> maxUses()
Maximum number of times the tool can be used in the API request.
-
userLocation
final Optional<WebSearchTool20250305.UserLocation> userLocation()
Parameters for the user's location. Used to provide more relevant search results.
-
_allowedDomains
final JsonField<List<String>> _allowedDomains()
Returns the raw JSON value of allowedDomains.
Unlike allowedDomains, this method doesn't throw if the JSON field has an unexpected type.
-
_blockedDomains
final JsonField<List<String>> _blockedDomains()
Returns the raw JSON value of blockedDomains.
Unlike blockedDomains, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheControl
final JsonField<CacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_maxUses
final JsonField<Long> _maxUses()
Returns the raw JSON value of maxUses.
Unlike maxUses, this method doesn't throw if the JSON field has an unexpected type.
-
_userLocation
final JsonField<WebSearchTool20250305.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 WebSearchTool20250305.Builder toBuilder()
-
validate
final WebSearchTool20250305 validate()
-
builder
final static WebSearchTool20250305.Builder builder()
Returns a mutable builder for constructing an instance of WebSearchTool20250305.
-
-
-
-