- Resource: Answer
- Methods
Resource: Answer
Defines an answer.
JSON representation |
---|
{ "name": string, "state": enum ( |
Fields | |
---|---|
name |
Immutable. Fully qualified name |
state |
The state of the answer generation. |
answerText |
The textual answer. |
citations[] |
Citations. |
references[] |
References. |
relatedQuestions[] |
Suggested related questions. |
steps[] |
Answer generation steps. |
queryUnderstandingInfo |
Query understanding information. |
answerSkippedReasons[] |
Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. |
createTime |
Output only. Answer creation timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
completeTime |
Output only. Answer completed timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
State
Enumeration of the state of the answer generation.
Enums | |
---|---|
STATE_UNSPECIFIED |
Unknown. |
IN_PROGRESS |
Answer generation is currently in progress. |
FAILED |
Answer generation currently failed. |
SUCCEEDED |
Answer generation has succeeded. |
Citation
Citation info for a segment.
JSON representation |
---|
{
"startIndex": string,
"endIndex": string,
"sources": [
{
object ( |
Fields | |
---|---|
startIndex |
Index indicates the start of the segment, measured in bytes (UTF-8 unicode). |
endIndex |
End of the attributed segment, exclusive. |
sources[] |
Citation sources for the attributed segment. |
CitationSource
Citation source.
JSON representation |
---|
{ "referenceId": string } |
Fields | |
---|---|
referenceId |
ID of the citation source. |
Reference
Reference.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field content . Search result content. content can be only one of the following: |
|
unstructuredDocumentInfo |
Unstructured document information. |
chunkInfo |
Chunk information. |
UnstructuredDocumentInfo
Unstructured document information.
JSON representation |
---|
{
"document": string,
"uri": string,
"title": string,
"chunkContents": [
{
object ( |
Fields | |
---|---|
document |
Document resource name. |
uri |
URI for the document. |
title |
Title. |
chunkContents[] |
List of cited chunk contents derived from document content. |
structData |
The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result. |
ChunkContent
Chunk content.
JSON representation |
---|
{ "content": string, "pageIdentifier": string } |
Fields | |
---|---|
content |
Chunk textual content. |
pageIdentifier |
Page identifier. |
ChunkInfo
Chunk information.
JSON representation |
---|
{
"chunk": string,
"content": string,
"documentMetadata": {
object ( |
Fields | |
---|---|
chunk |
Chunk resource name. |
content |
Chunk textual content. |
documentMetadata |
Document metadata. |
relevanceScore |
Relevance score. |
DocumentMetadata
Document metadata.
JSON representation |
---|
{ "document": string, "uri": string, "title": string, "pageIdentifier": string, "structData": { object } } |
Fields | |
---|---|
document |
Document resource name. |
uri |
URI for the document. |
title |
Title. |
pageIdentifier |
Page identifier. |
structData |
The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result. |
Step
Step information.
JSON representation |
---|
{ "state": enum ( |
Fields | |
---|---|
state |
The state of the step. |
description |
The description of the step. |
thought |
The thought of the step. |
actions[] |
Actions. |
State
Enumeration of the state of the step.
Enums | |
---|---|
STATE_UNSPECIFIED |
Unknown. |
IN_PROGRESS |
Step is currently in progress. |
FAILED |
Step currently failed. |
SUCCEEDED |
Step has succeeded. |
Action
Action.
JSON representation |
---|
{ "observation": { object ( |
Fields | |
---|---|
observation |
Observation. |
Union field action . The action. action can be only one of the following: |
|
searchAction |
Search action. |
SearchAction
Search action.
JSON representation |
---|
{ "query": string } |
Fields | |
---|---|
query |
The query to search. |
Observation
Observation.
JSON representation |
---|
{
"searchResults": [
{
object ( |
Fields | |
---|---|
searchResults[] |
Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user. |
SearchResult
JSON representation |
---|
{ "document": string, "uri": string, "title": string, "snippetInfo": [ { object ( |
Fields | |
---|---|
document |
Document resource name. |
uri |
URI for the document. |
title |
Title. |
snippetInfo[] |
If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets. |
chunkInfo[] |
If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info. |
SnippetInfo
Snippet information.
JSON representation |
---|
{ "snippet": string, "snippetStatus": string } |
Fields | |
---|---|
snippet |
Snippet content. |
snippetStatus |
Status of the snippet defined by the search team. |
ChunkInfo
Chunk information.
JSON representation |
---|
{ "chunk": string, "content": string, "relevanceScore": number } |
Fields | |
---|---|
chunk |
Chunk resource name. |
content |
Chunk textual content. |
relevanceScore |
Relevance score. |
QueryUnderstandingInfo
Query understanding information.
JSON representation |
---|
{
"queryClassificationInfo": [
{
object ( |
Fields | |
---|---|
queryClassificationInfo[] |
Query classification information. |
QueryClassificationInfo
Query classification information.
JSON representation |
---|
{
"type": enum ( |
Fields | |
---|---|
type |
Query classification type. |
positive |
Classification output. |
Type
Query classification types.
Enums | |
---|---|
TYPE_UNSPECIFIED |
Unspecified query classification type. |
ADVERSARIAL_QUERY |
Adversarial query classification type. |
NON_ANSWER_SEEKING_QUERY |
Non-answer-seeking query classification type. |
AnswerSkippedReason
An enum for answer skipped reasons.
Enums | |
---|---|
ANSWER_SKIPPED_REASON_UNSPECIFIED |
Default value. The answer skipped reason is not specified. |
ADVERSARIAL_QUERY_IGNORED |
The adversarial query ignored case. |
NON_ANSWER_SEEKING_QUERY_IGNORED |
The non-answer seeking query ignored case. |
OUT_OF_DOMAIN_QUERY_IGNORED |
The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results. |
POTENTIAL_POLICY_VIOLATION |
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 |
The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results. |
Methods |
|
---|---|
|
Gets a Answer. |