Firebase.AI.Segment

Represents a specific segment within a ModelContent struct, often used to pinpoint the exact location of text or data that grounding information refers to.

Summary

Properties

EndIndex
int
The zero-based end index of the segment within the specified Part, measured in UTF-8 bytes.
PartIndex
int
The zero-based index of the Part object within the parts array of its parent ModelContent object.
StartIndex
int
The zero-based start index of the segment within the specified Part, measured in UTF-8 bytes.
Text
string
The text corresponding to the segment from the response.

Properties

EndIndex

int Firebase::AI::Segment::EndIndex

The zero-based end index of the segment within the specified Part, measured in UTF-8 bytes.

This offset is exclusive, meaning the character at this index is not included in the segment.

PartIndex

int Firebase::AI::Segment::PartIndex

The zero-based index of the Part object within the parts array of its parent ModelContent object.

This identifies which part of the content the segment belongs to.

StartIndex

int Firebase::AI::Segment::StartIndex

The zero-based start index of the segment within the specified Part, measured in UTF-8 bytes.

This offset is inclusive, starting from 0 at the beginning of the part's content.

Text

string Firebase::AI::Segment::Text

The text corresponding to the segment from the response.