Class GroundingChunkRetrievedContext

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GroundingChunkRetrievedContext

public abstract class GroundingChunkRetrievedContext extends JsonSerializable
Chunk from context retrieved by the retrieval tools.
  • Constructor Details

    • GroundingChunkRetrievedContext

      public GroundingChunkRetrievedContext()
  • Method Details

    • documentName

      public abstract Optional<String> documentName()
      Output only. The full document name for the referenced Vertex AI Search document.
    • ragChunk

      public abstract Optional<RagChunk> ragChunk()
      Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool.
    • text

      public abstract Optional<String> text()
      Text of the attribution.
    • title

      public abstract Optional<String> title()
      Title of the attribution.
    • uri

      public abstract Optional<String> uri()
      URI reference of the attribution.
    • builder

      public static GroundingChunkRetrievedContext.Builder builder()
      Instantiates a builder for GroundingChunkRetrievedContext.
    • toBuilder

      public abstract GroundingChunkRetrievedContext.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static GroundingChunkRetrievedContext fromJson(String jsonString)
      Deserializes a JSON string to a GroundingChunkRetrievedContext object.