- Resource: AssistAnswer
- Methods
Resource: AssistAnswer
AssistAnswer resource, main part of AssistResponse
.
JSON representation |
---|
{ "name": string, "state": enum ( |
Fields | |
---|---|
name |
Immutable. Resource name of the This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
state |
State of the answer generation. |
replies[] |
Replies of the assistant. |
diagnosticInfo |
Diagnostic information collected while processing the request. This is meant for human readers only, mainly to help with debugging. The structure of the data is subject to change without notice. |
assistSkippedReasons[] |
Reasons for not answering the assist call. |
State
State of the answer generation.
Enums | |
---|---|
STATE_UNSPECIFIED |
Unknown. |
IN_PROGRESS |
Assist operation is currently in progress. |
FAILED |
Assist operation has failed. |
SUCCEEDED |
Assist operation has succeeded. |
SKIPPED |
Assist operation has been skipped. |
Reply
One part of the multi-part response of the assist call.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field reply . Alternatives for the assistant reply. reply can be only one of the following: |
|
groundedContent |
Possibly grounded response text or media from the assistant. |
AssistantGroundedContent
A piece of content and possibly its grounding information.
Not all content needs grounding. Phrases like "Of course, I will gladly search it for you." do not need grounding.
JSON representation |
---|
{ "content": { object ( |
Fields | |
---|---|
content |
The content. |
contentMetadata |
Metadata for the content. Currently only used for answers of research assistants. |
Union field metadata . Grounding metadata for various modals. It only supports text for now. metadata can be only one of the following: |
|
textGroundingMetadata |
Metadata for grounding based on text sources. |
groundingScore |
Deprecated: Use |
TextGroundingMetadata
Grounding details for text sources.
JSON representation |
---|
{ "segments": [ { object ( |
Fields | |
---|---|
segments[] |
Grounding information for parts of the text. |
references[] |
References for the grounded text. |
searchEntryPoints[] |
Google Search entry points for the web searches used for grounding. |
Segment
Grounding information for a segment of the text.
JSON representation |
---|
{ "startIndex": string, "endIndex": string, "referenceIndices": [ integer ], "groundingScore": number, "text": string } |
Fields | |
---|---|
startIndex |
Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one). |
endIndex |
End of the segment, exclusive. |
referenceIndices[] |
References for the segment. |
groundingScore |
Score for the segment. |
text |
The text segment itself. |
Reference
Referenced content and related document metadata.
JSON representation |
---|
{
"content": string,
"documentMetadata": {
object ( |
Fields | |
---|---|
content |
Referenced text content. |
documentMetadata |
Document metadata. |
DocumentMetadata
Document metadata.
JSON representation |
---|
{ "document": string, "uri": string, "title": string, "pageIdentifier": string, "domain": string } |
Fields | |
---|---|
document |
Document resource name. |
uri |
URI for the document. It may contain a URL that redirects to the actual website. |
title |
Title. |
pageIdentifier |
Page identifier. |
domain |
Domain name from the document URI. Note that the |
SearchEntryPoint
Google Search entry point.
JSON representation |
---|
{ "renderedContent": string } |
Fields | |
---|---|
renderedContent |
Web content snippet that can be embedded in a web page or an app webview. |
AssistantContent
Multi-modal content.
JSON representation |
---|
{ "role": string, // Union field |
Fields | |
---|---|
role |
The producer of the content. Can be "model" or "user". |
Union field data . Contained data. data can be only one of the following: |
|
text |
Inline text. |
inlineData |
Inline binary data. |
file |
A file, e.g., an audio summary. |
Blob
Inline blob.
JSON representation |
---|
{ "mimeType": string, "data": string } |
Fields | |
---|---|
mimeType |
Required. The media type (MIME type) of the generated data. |
data |
Required. Raw bytes. A base64-encoded string. |
File
A file, e.g., an audio summary.
JSON representation |
---|
{ "mimeType": string, "fileId": string } |
Fields | |
---|---|
mimeType |
Required. The media type (MIME type) of the file. |
fileId |
Required. The file ID. |
ContentMetadata
Metadata for the content.
JSON representation |
---|
{
"contentKind": enum ( |
Fields | |
---|---|
contentKind |
Type of the content. Shows which part of the answer of the research assistant this content belongs to. |
contentId |
ID of the content. It is used to connect research questions with answers to them. For example, the parts of the answer to a research question will have the same |
ContentKind
Possible content kinds. Currently only used for differentiating sections in the full answer of a research assistant.
Enums | |
---|---|
CONTENT_KIND_UNSPECIFIED |
Unknown. |
RESEARCH_PLAN |
Research plan. |
RESEARCH_QUESTION |
Research question. |
RESEARCH_ANSWER |
Research answer. |
RESEARCH_REPORT |
Research report. |
RESEARCH_AUDIO_SUMMARY |
Research audio summary. |
AssistSkippedReason
Possible reasons for not answering an assist call.
Enums | |
---|---|
ASSIST_SKIPPED_REASON_UNSPECIFIED |
Default value. Skip reason is not specified. |
NON_ASSIST_SEEKING_QUERY_IGNORED |
The assistant ignored the query, because it did not appear to be answer-seeking. |
CUSTOMER_POLICY_VIOLATION |
The assistant ignored the query or refused to answer because of a customer policy violation (e.g., the query or the answer contained a banned phrase). |
Methods |
|
---|---|
|
Gets an AssistAnswer . |