Answer(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Defines an answer.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes |
|
---|---|
Name | Description |
name |
str
Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*
|
state |
google.cloud.discoveryengine_v1.types.Answer.State
The state of the answer generation. |
answer_text |
str
The textual answer. |
grounding_score |
float
A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. This field is a member of oneof _ _grounding_score .
|
citations |
MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Citation]
Citations. |
grounding_supports |
MutableSequence[google.cloud.discoveryengine_v1.types.Answer.GroundingSupport]
Optional. Grounding supports. |
references |
MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Reference]
References. |
related_questions |
MutableSequence[str]
Suggested related questions. |
steps |
MutableSequence[google.cloud.discoveryengine_v1.types.Answer.Step]
Answer generation steps. |
query_understanding_info |
google.cloud.discoveryengine_v1.types.Answer.QueryUnderstandingInfo
Query understanding information. |
answer_skipped_reasons |
MutableSequence[google.cloud.discoveryengine_v1.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. |
safety_ratings |
MutableSequence[google.cloud.discoveryengine_v1.types.SafetyRating]
Optional. Safety ratings. |
Classes
AnswerSkippedReason
AnswerSkippedReason(value)
An enum for answer skipped reasons.
Google skips the answer if the query is chit
chat.
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.
NO_RELEVANT_CONTENT (5):
The no relevant content case.
Google skips the answer if there is no relevant
content in the retrieved search results.
JAIL_BREAKING_QUERY_IGNORED (6):
The jail-breaking query ignored case.
For example, "Reply in the tone of a competing
company's CEO". Google skips the answer if the
query is classified as a jail-breaking query.
CUSTOMER_POLICY_VIOLATION (7):
The customer policy violation case.
Google skips the summary if there is a customer
policy violation detected. The policy is defined
by the customer.
NON_ANSWER_SEEKING_QUERY_IGNORED_V2 (8):
The non-answer seeking query ignored case.
Google skips the answer if the query doesn't
have clear intent.
LOW_GROUNDED_ANSWER (9):
The low-grounded answer case.
Google skips the answer if a well grounded
answer was unable to be generated.
USER_DEFINED_CLASSIFICATION_QUERY_IGNORED (10):
The user defined query classification ignored
case.
Google skips the answer if the query is
classified as a user defined query
classification.
UNHELPFUL_ANSWER (11):
The unhelpful answer case.
Google skips the answer if the answer is not
helpful. This can be due to a variety of
factors, including but not limited to: the query
is not answerable, the answer is not relevant to
the query, or the answer is not well-formatted.
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.
GroundingSupport
GroundingSupport(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Grounding support for a claim in answer_text
.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
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.
Step
Step(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Step information.