Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class CheckGroundingRequest.
Request message for GroundedGenerationService.CheckGrounding method.
Generated from protobuf message google.cloud.discoveryengine.v1.CheckGroundingRequest
Namespace
Google \ Cloud \ DiscoveryEngine \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ grounding_config |
string
Required. The resource name of the grounding config, such as |
↳ answer_candidate |
string
Answer candidate to check. It can have a maximum length of 4096 tokens. |
↳ facts |
array<GroundingFact>
List of facts for the grounding check. We support up to 200 facts. |
↳ grounding_spec |
CheckGroundingSpec
Configuration of the grounding check. |
↳ user_labels |
array|Google\Protobuf\Internal\MapField
The user labels applied to a resource must meet the following requirements: * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * * The key portion of a label must be unique. However, you can use the same key with multiple resources. * * Keys must start with a lowercase letter or international character. See Google Cloud Document for more details. |
getGroundingConfig
Required. The resource name of the grounding config, such as
projects/*/locations/global/groundingConfigs/default_grounding_config.
| Returns | |
|---|---|
| Type | Description |
string |
|
setGroundingConfig
Required. The resource name of the grounding config, such as
projects/*/locations/global/groundingConfigs/default_grounding_config.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAnswerCandidate
Answer candidate to check. It can have a maximum length of 4096 tokens.
| Returns | |
|---|---|
| Type | Description |
string |
|
setAnswerCandidate
Answer candidate to check. It can have a maximum length of 4096 tokens.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFacts
List of facts for the grounding check.
We support up to 200 facts.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setFacts
List of facts for the grounding check.
We support up to 200 facts.
| Parameter | |
|---|---|
| Name | Description |
var |
array<GroundingFact>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getGroundingSpec
Configuration of the grounding check.
| Returns | |
|---|---|
| Type | Description |
CheckGroundingSpec|null |
|
hasGroundingSpec
clearGroundingSpec
setGroundingSpec
Configuration of the grounding check.
| Parameter | |
|---|---|
| Name | Description |
var |
CheckGroundingSpec
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUserLabels
The user labels applied to a resource must meet the following requirements:
Each resource can have multiple labels, up to a maximum of 64.
Each label must be a key-value pair.
- Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
- The key portion of a label must be unique. However, you can use the same key with multiple resources.
- Keys must start with a lowercase letter or international character. See Google Cloud Document for more details.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField |
|
setUserLabels
The user labels applied to a resource must meet the following requirements:
Each resource can have multiple labels, up to a maximum of 64.
Each label must be a key-value pair.
- Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
- The key portion of a label must be unique. However, you can use the same key with multiple resources.
- Keys must start with a lowercase letter or international character. See Google Cloud Document for more details.
| Parameter | |
|---|---|
| Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
| Returns | |
|---|---|
| Type | Description |
$this |
|