Google Cloud Discovery Engine V1beta Client - Class CheckGroundingRequest (0.11.3)

Reference documentation and code samples for the Google Cloud Discovery Engine V1beta Client class CheckGroundingRequest.

Request message for GroundedGenerationService.CheckGrounding method.

Generated from protobuf message google.cloud.discoveryengine.v1beta.CheckGroundingRequest

Namespace

Google \ Cloud \ DiscoveryEngine \ V1beta

Methods

__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 projects/*/locations/global/groundingConfigs/default_grounding_config.

↳ answer_candidate string

Answer candidate to check. Can have a maximum length of 1024 characters.

↳ facts array<Google\Cloud\DiscoveryEngine\V1beta\GroundingFact>

List of facts for the grounding check. We support up to 200 facts.

↳ grounding_spec Google\Cloud\DiscoveryEngine\V1beta\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. Can have a maximum length of 1024 characters.

Returns
Type Description
string

setAnswerCandidate

Answer candidate to check. Can have a maximum length of 1024 characters.

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<Google\Cloud\DiscoveryEngine\V1beta\GroundingFact>
Returns
Type Description
$this

getGroundingSpec

Configuration of the grounding check.

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingSpec|null

hasGroundingSpec

clearGroundingSpec

setGroundingSpec

Configuration of the grounding check.

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1beta\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