Package com.google.genai.types
Class GroundingChunkRetrievedContext
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GroundingChunkRetrievedContext
Context retrieved from a data source to ground the model's response. This is used when a
retrieval tool fetches information from a user-provided corpus or a public dataset. This data
type is not supported in Gemini API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for GroundingChunkRetrievedContext. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiates a builder for GroundingChunkRetrievedContext.Output only.Deserializes a JSON string to a GroundingChunkRetrievedContext object.ragChunk()Additional context for a Retrieval-Augmented Generation (RAG) retrieval result.text()The content of the retrieved data source.title()The title of the retrieved data source.Creates a builder with the same values as this instance.uri()The URI of the retrieved data source.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
GroundingChunkRetrievedContext
public GroundingChunkRetrievedContext()
-
-
Method Details
-
documentName
Output only. The full resource name of the referenced Vertex AI Search document. This is used to identify the specific document that was retrieved. The format is `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. -
ragChunk
Additional context for a Retrieval-Augmented Generation (RAG) retrieval result. This is populated only when the RAG retrieval tool is used. -
text
The content of the retrieved data source. -
title
The title of the retrieved data source. -
uri
The URI of the retrieved data source. -
builder
Instantiates a builder for GroundingChunkRetrievedContext. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a GroundingChunkRetrievedContext object.
-