Package com.google.genai.types
Class Retrieval
-
- All Implemented Interfaces:
public abstract class Retrieval extends JsonSerializable
Defines a retrieval tool that model can call to access external knowledge. This data type is not supported in Gemini API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classRetrieval.BuilderBuilder for Retrieval.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description Retrieval()
-
Method Summary
Modifier and Type Method Description abstract Optional<Boolean>disableAttribution()Optional. abstract Optional<ExternalApi>externalApi()Use data source powered by external API for grounding. abstract Optional<VertexAISearch>vertexAiSearch()Set to use data source powered by Vertex AI Search. abstract Optional<VertexRagStore>vertexRagStore()Set to use data source powered by Vertex RAG store. static Retrieval.Builderbuilder()Instantiates a builder for Retrieval. abstract Retrieval.BuildertoBuilder()Creates a builder with the same values as this instance. static RetrievalfromJson(String jsonString)Deserializes a JSON string to a Retrieval 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
-
disableAttribution
abstract Optional<Boolean> disableAttribution()
Optional. Deprecated. This option is no longer supported.
-
externalApi
abstract Optional<ExternalApi> externalApi()
Use data source powered by external API for grounding.
-
vertexAiSearch
abstract Optional<VertexAISearch> vertexAiSearch()
Set to use data source powered by Vertex AI Search.
-
vertexRagStore
abstract Optional<VertexRagStore> vertexRagStore()
Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
-
builder
static Retrieval.Builder builder()
Instantiates a builder for Retrieval.
-
toBuilder
abstract Retrieval.Builder toBuilder()
Creates a builder with the same values as this instance.
-
-
-
-