Class RagChunkPageSpan

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

public abstract class RagChunkPageSpan extends JsonSerializable
Represents where the chunk starts and ends in the document.
  • Constructor Details

    • RagChunkPageSpan

      public RagChunkPageSpan()
  • Method Details

    • firstPage

      public abstract Optional<Integer> firstPage()
      Page where chunk starts in the document. Inclusive. 1-indexed.
    • lastPage

      public abstract Optional<Integer> lastPage()
      Page where chunk ends in the document. Inclusive. 1-indexed.
    • builder

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

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

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