Class GoogleSearch
-
- All Implemented Interfaces:
public abstract class GoogleSearch extends JsonSerializable
GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classGoogleSearch.BuilderBuilder for GoogleSearch.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description GoogleSearch()
-
Method Summary
Modifier and Type Method Description abstract Optional<SearchTypes>searchTypes()Optional. abstract Optional<PhishBlockThreshold>blockingConfidence()Optional. abstract Optional<List<String>>excludeDomains()Optional. abstract Optional<Interval>timeRangeFilter()Optional. static GoogleSearch.Builderbuilder()Instantiates a builder for GoogleSearch. abstract GoogleSearch.BuildertoBuilder()Creates a builder with the same values as this instance. static GoogleSearchfromJson(String jsonString)Deserializes a JSON string to a GoogleSearch object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
searchTypes
abstract Optional<SearchTypes> searchTypes()
Optional. The set of search types to enable. If not set, web search is enabled by default.
-
blockingConfidence
abstract Optional<PhishBlockThreshold> blockingConfidence()
Optional. Sites with confidence level chosen &above this value will be blocked from the search results. This field is not supported in Gemini API.
-
excludeDomains
abstract Optional<List<String>> excludeDomains()
Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. This field is not supported in Gemini API.
-
timeRangeFilter
abstract Optional<Interval> timeRangeFilter()
Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa). This field is not supported in Vertex AI.
-
builder
static GoogleSearch.Builder builder()
Instantiates a builder for GoogleSearch.
-
toBuilder
abstract GoogleSearch.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static GoogleSearch fromJson(String jsonString)
Deserializes a JSON string to a GoogleSearch object.
-
-
-
-