Package com.google.genai.types
Class RagChunk
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.RagChunk
A RagChunk includes the content of a chunk of a RagFile, and associated metadata. This data type
is not supported in Gemini API.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RagChunk.Builderbuilder()Instantiates a builder for RagChunk.static RagChunkDeserializes a JSON string to a RagChunk object.abstract Optional<RagChunkPageSpan>pageSpan()If populated, represents where the chunk starts and ends in the document.text()The content of the chunk.abstract RagChunk.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
RagChunk
public RagChunk()
-
-
Method Details
-
pageSpan
If populated, represents where the chunk starts and ends in the document. -
text
The content of the chunk. -
builder
Instantiates a builder for RagChunk. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a RagChunk object.
-