Stay organized with collections
Save and categorize content based on your preferences.
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-24 UTC.
[null,null,["Last updated 2025-07-24 UTC."],[],[],null,["# Firebase.AI.Segment Struct Reference\n\nFirebase.AI.Segment\n===================\n\nRepresents a specific segment within a [ModelContent](/docs/reference/unity/struct/firebase/a-i/model-content#struct_firebase_1_1_a_i_1_1_model_content) struct, often used to pinpoint the exact location of text or data that grounding information refers to.\n\nSummary\n-------\n\n| ### Properties ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [EndIndex](#struct_firebase_1_1_a_i_1_1_segment_1a4d8735a90f26d3927a7ee4d42c87ccb8) | `int` The zero-based end index of the segment within the specified `Part`, measured in UTF-8 bytes. |\n| [PartIndex](#struct_firebase_1_1_a_i_1_1_segment_1af0eb055dd42b2cdadb4f0511a9e5a4dd) | `int` The zero-based index of the `Part` object within the `parts` array of its parent [ModelContent](/docs/reference/unity/struct/firebase/a-i/model-content#struct_firebase_1_1_a_i_1_1_model_content) object. |\n| [StartIndex](#struct_firebase_1_1_a_i_1_1_segment_1a298b3d890585374b466c3cee0778a72d) | `int` The zero-based start index of the segment within the specified `Part`, measured in UTF-8 bytes. |\n| [Text](#struct_firebase_1_1_a_i_1_1_segment_1ad3a1b47209779d8a0692020ee53232c5) | `string` The text corresponding to the segment from the response. |\n\nProperties\n----------\n\n### EndIndex\n\n```c#\nint Firebase::AI::Segment::EndIndex\n``` \nThe zero-based end index of the segment within the specified `Part`, measured in UTF-8 bytes.\n\nThis offset is exclusive, meaning the character at this index is not included in the segment. \n\n### PartIndex\n\n```c#\nint Firebase::AI::Segment::PartIndex\n``` \nThe zero-based index of the `Part` object within the `parts` array of its parent [ModelContent](/docs/reference/unity/struct/firebase/a-i/model-content#struct_firebase_1_1_a_i_1_1_model_content) object.\n\nThis identifies which part of the content the segment belongs to. \n\n### StartIndex\n\n```c#\nint Firebase::AI::Segment::StartIndex\n``` \nThe zero-based start index of the segment within the specified `Part`, measured in UTF-8 bytes.\n\nThis offset is inclusive, starting from 0 at the beginning of the part's content. \n\n### Text\n\n```c#\nstring Firebase::AI::Segment::Text\n``` \nThe text corresponding to the segment from the response."]]