Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Candidate.
A response candidate generated from the model.
Generated from protobuf message google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ GenerateGroundedContentResponseMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ index |
int
Index of the candidate. |
↳ content |
Google\Cloud\DiscoveryEngine\V1\GroundedGenerationContent
Content of the candidate. |
↳ grounding_score |
float
The overall grounding score for the candidate, in the range of [0, 1]. |
↳ grounding_metadata |
Candidate\GroundingMetadata
Grounding metadata for the generated content. |
getIndex
Index of the candidate.
Returns | |
---|---|
Type | Description |
int |
setIndex
Index of the candidate.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getContent
Content of the candidate.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1\GroundedGenerationContent|null |
hasContent
clearContent
setContent
Content of the candidate.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1\GroundedGenerationContent
|
Returns | |
---|---|
Type | Description |
$this |
getGroundingScore
The overall grounding score for the candidate, in the range of [0, 1].
Returns | |
---|---|
Type | Description |
float |
hasGroundingScore
clearGroundingScore
setGroundingScore
The overall grounding score for the candidate, in the range of [0, 1].
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |
getGroundingMetadata
Grounding metadata for the generated content.
Returns | |
---|---|
Type | Description |
Candidate\GroundingMetadata|null |
hasGroundingMetadata
clearGroundingMetadata
setGroundingMetadata
Grounding metadata for the generated content.
Parameter | |
---|---|
Name | Description |
var |
Candidate\GroundingMetadata
|
Returns | |
---|---|
Type | Description |
$this |