Service Client: Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GroundedGenerationServiceClient
Client stub representing the remote GroundedGenerationService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to discoveryengine.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService - Compiled Protocol Buffers messages for google/cloud/discoveryengine/v1beta/grounded_generation_service.proto
SYNOPSIS
use Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService;
my $msg = Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GroundedGenerationContent->new({
role => $role,
parts => $parts,
});
# Read or update a field
my $val = $msg->role();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GroundedGenerationContent->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/discoveryengine/v1beta/grounded_generation_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GroundedGenerationContent
Base structured datatype containing multi-part content of a message.
Inherits from Protobuf::Message.
Accessors
$msg->role()/$msg->role($value)Type:
StringProducer of the content. Must be either `user` or `model`.
Intended to be used for multi-turn conversations. Otherwise, it can be left unset.
$msg->parts()/$msg->parts($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GroundedGenerationContent::Part)Ordered `Parts` that constitute a single message.
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GenerateGroundedContentRequest
Top-level message sent by the client for the `GenerateGroundedContent` method.
Inherits from Protobuf::Message.
Accessors
$msg->location()/$msg->location($value)Type:
StringRequired. Location resource.
Format: `projects/{project}/locations/{location}`.
$msg->system_instruction()/$msg->system_instruction($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GroundedGenerationContent)Content of the system instruction for the current API.
These instructions will take priority over any other prompt instructions if the selected model is supporting them.
$msg->contents()/$msg->contents($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GroundedGenerationContent)Content of the current conversation with the model.
For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
$msg->generation_spec()/$msg->generation_spec($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GenerateGroundedContentRequest::GenerationSpec)Content generation specification.
$msg->grounding_spec()/$msg->grounding_spec($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GenerateGroundedContentRequest::GroundingSpec)Grounding specification.
$msg->user_labels()/$msg->user_labels($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GenerateGroundedContentRequest::UserLabelsEntry)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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GenerateGroundedContentResponse
Response for the `GenerateGroundedContent` method.
Inherits from Protobuf::Message.
Accessors
$msg->candidates()/$msg->candidates($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::GenerateGroundedContentResponse::Candidate)Generated candidates.
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::CheckGroundingSpec
Specification for the grounding check.
Inherits from Protobuf::Message.
Accessors
$msg->citation_threshold()/$msg->citation_threshold($value)Type:
DoubleThe threshold (in [0,1]) used for determining whether a fact must be cited for a claim in the answer candidate. Choosing a higher threshold will lead to fewer but very strong citations, while choosing a lower threshold may lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6.
$msg->enable_claim_level_score()/$msg->enable_claim_level_score($value)Type:
BoolThe control flag that enables claim-level grounding score in the response.
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::CheckGroundingRequest
Request message for [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] method.
Inherits from Protobuf::Message.
Accessors
$msg->grounding_config()/$msg->grounding_config($value)Type:
StringRequired. The resource name of the grounding config, such as `projects/*/locations/global/groundingConfigs/default_grounding_config`.
$msg->answer_candidate()/$msg->answer_candidate($value)Type:
StringAnswer candidate to check. It can have a maximum length of 4096 tokens.
$msg->facts()/$msg->facts($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::Grounding::GroundingFact)List of facts for the grounding check. We support up to 200 facts.
$msg->grounding_spec()/$msg->grounding_spec($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::CheckGroundingSpec)Configuration of the grounding check.
$msg->user_labels()/$msg->user_labels($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::CheckGroundingRequest::UserLabelsEntry)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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::CheckGroundingResponse
Response message for the [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] method.
Inherits from Protobuf::Message.
Accessors
$msg->support_score()/$msg->support_score($value)Type:
FloatThe support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.
$msg->cited_chunks()/$msg->cited_chunks($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::Grounding::FactChunk)List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
$msg->cited_facts()/$msg->cited_facts($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::CheckGroundingResponse::CheckGroundingFactChunk)List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
$msg->claims()/$msg->claims($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::CheckGroundingResponse::Claim)Claim texts and citation info across all claims in the answer candidate.
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::CitationMetadata
A collection of source attributions for a piece of content.
Inherits from Protobuf::Message.
Accessors
$msg->citations()/$msg->citations($value)Type:
Message(Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::Citation)Output only. List of citations.
Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::Citation
Source attributions for content.
Inherits from Protobuf::Message.
Accessors
$msg->start_index()/$msg->start_index($value)Type:
Int32Output only. Start index into the content.
$msg->end_index()/$msg->end_index($value)Type:
Int32Output only. End index into the content.
$msg->uri()/$msg->uri($value)Type:
StringOutput only. Url reference of the attribution.
$msg->title()/$msg->title($value)Type:
StringOutput only. Title of the attribution.
$msg->license()/$msg->license($value)Type:
StringOutput only. License of the attribution.
$msg->publication_date()/$msg->publication_date($value)Type:
Message(Google::Type::Date::Date)Output only. Publication date of the attribution.
Enum: Citation::PhishBlockThreshold
PHISH_BLOCK_THRESHOLD_UNSPECIFIED=>0BLOCK_LOW_AND_ABOVE=>30BLOCK_MEDIUM_AND_ABOVE=>40BLOCK_HIGH_AND_ABOVE=>50BLOCK_HIGHER_AND_ABOVE=>55BLOCK_VERY_HIGH_AND_ABOVE=>60BLOCK_ONLY_EXTREMELY_HIGH=>100
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Discoveryengine::V1beta::GroundedGenerationService::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.