Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Segment.
Grounding information for a segment of the text.
Generated from protobuf message google.cloud.discoveryengine.v1.AssistantGroundedContent.TextGroundingMetadata.Segment
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ AssistantGroundedContent \ TextGroundingMetadataMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ start_index |
int|string
Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one). |
↳ end_index |
int|string
End of the segment, exclusive. |
↳ reference_indices |
array
References for the segment. |
↳ grounding_score |
float
Score for the segment. |
↳ text |
string
The text segment itself. |
getStartIndex
Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
Returns | |
---|---|
Type | Description |
int|string |
setStartIndex
Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getEndIndex
End of the segment, exclusive.
Returns | |
---|---|
Type | Description |
int|string |
setEndIndex
End of the segment, exclusive.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getReferenceIndices
References for the segment.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setReferenceIndices
References for the segment.
Parameter | |
---|---|
Name | Description |
var |
int[]
|
Returns | |
---|---|
Type | Description |
$this |
getGroundingScore
Score for the segment.
Returns | |
---|---|
Type | Description |
float |
setGroundingScore
Score for the segment.
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |
getText
The text segment itself.
Returns | |
---|---|
Type | Description |
string |
setText
The text segment itself.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |