Class Answer (0.11.11)

Answer(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Defines an answer.

Attributes

Name Description
name str
Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*
state google.cloud.discoveryengine_v1alpha.types.Answer.State
The state of the answer generation.
answer_text str
The textual answer.
citations MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Citation]
Citations.
references MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Reference]
References.
related_questions MutableSequence[str]
Suggested related questions.
steps MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.Step]
Answer generation steps.
query_understanding_info google.cloud.discoveryengine_v1alpha.types.Answer.QueryUnderstandingInfo
Query understanding information.
answer_skipped_reasons MutableSequence[google.cloud.discoveryengine_v1alpha.types.Answer.AnswerSkippedReason]
Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
create_time google.protobuf.timestamp_pb2.Timestamp
Output only. Answer creation timestamp.
complete_time google.protobuf.timestamp_pb2.Timestamp
Output only. Answer completed timestamp.

Classes

AnswerSkippedReason

AnswerSkippedReason(value)

An enum for answer skipped reasons.

Values: ANSWER_SKIPPED_REASON_UNSPECIFIED (0): Default value. The answer skipped reason is not specified. ADVERSARIAL_QUERY_IGNORED (1): The adversarial query ignored case. NON_ANSWER_SEEKING_QUERY_IGNORED (2): The non-answer seeking query ignored case. OUT_OF_DOMAIN_QUERY_IGNORED (3): The out-of-domain query ignored case.

    Google skips the answer if there are no
    high-relevance search results.
POTENTIAL_POLICY_VIOLATION (4):
    The potential policy violation case.

    Google skips the answer if there is a potential
    policy violation detected. This includes content
    that may be violent or toxic.

Citation

Citation(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Citation info for a segment.

CitationSource

CitationSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Citation source.

QueryUnderstandingInfo

QueryUnderstandingInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Query understanding information.

Reference

Reference(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Reference.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

State

State(value)

Enumeration of the state of the answer generation.

Values: STATE_UNSPECIFIED (0): Unknown. IN_PROGRESS (1): Answer generation is currently in progress. FAILED (2): Answer generation currently failed. SUCCEEDED (3): Answer generation has succeeded.

Step

Step(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Step information.