Table of Contents

Class RagChunkPageSpan

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Represents where the chunk starts and ends in the document. This data type is not supported in Gemini API.

public record RagChunkPageSpan : IEquatable<RagChunkPageSpan>
Inheritance
RagChunkPageSpan
Implements
Inherited Members

Properties

FirstPage

Page where chunk starts in the document. Inclusive. 1-indexed.

[JsonPropertyName("firstPage")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? FirstPage { get; set; }

Property Value

int?

LastPage

Page where chunk ends in the document. Inclusive. 1-indexed.

[JsonPropertyName("lastPage")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? LastPage { get; set; }

Property Value

int?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a RagChunkPageSpan object.

public static RagChunkPageSpan? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

RagChunkPageSpan

The deserialized RagChunkPageSpan object, or null if deserialization fails.