Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Claim.
Text and citation info for a claim in the answer candidate.
Generated from protobuf message google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ CheckGroundingResponseMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ start_pos |
int
Position indicating the start of the claim in the answer candidate, measured in bytes. |
↳ end_pos |
int
Position indicating the end of the claim in the answer candidate, exclusive. |
↳ claim_text |
string
Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found. |
↳ citation_indices |
array
A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact. |
↳ grounding_check_required |
bool
Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, anti_citation_indices, and score should not be returned. |
getStartPos
Position indicating the start of the claim in the answer candidate, measured in bytes.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasStartPos
clearStartPos
setStartPos
Position indicating the start of the claim in the answer candidate, measured in bytes.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEndPos
Position indicating the end of the claim in the answer candidate, exclusive.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasEndPos
clearEndPos
setEndPos
Position indicating the end of the claim in the answer candidate, exclusive.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getClaimText
Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.
| Returns | |
|---|---|
| Type | Description |
string |
|
setClaimText
Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCitationIndices
A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setCitationIndices
A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.
| Parameter | |
|---|---|
| Name | Description |
var |
int[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getGroundingCheckRequired
Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, anti_citation_indices, and score should not be returned.
| Returns | |
|---|---|
| Type | Description |
bool |
|
hasGroundingCheckRequired
clearGroundingCheckRequired
setGroundingCheckRequired
Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, anti_citation_indices, and score should not be returned.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|