REST Resource: projects.locations.collections.engines.sessions.assistAnswers

Resource: AssistAnswer

AssistAnswer resource, main part of AssistResponse.

JSON representation
{
  "name": string,
  "state": enum (State),
  "replies": [
    {
      object (Reply)
    }
  ],
  "diagnosticInfo": {
    object
  },
  "assistSkippedReasons": [
    enum (AssistSkippedReason)
  ]
}
Fields
name

string

Immutable. Resource name of the AssistAnswer. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assistAnswer}

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

state

enum (State)

State of the answer generation.

replies[]

object (Reply)

Replies of the assistant.

diagnosticInfo

object (Struct format)

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[]

enum (AssistSkippedReason)

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 reply can be only one of the following:
  "groundedContent": {
    object (AssistantGroundedContent)
  }
  // End of list of possible types for union field reply.
}
Fields
Union field reply. Alternatives for the assistant reply. reply can be only one of the following:
groundedContent

object (AssistantGroundedContent)

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 (AssistantContent)
  },
  "contentMetadata": {
    object (ContentMetadata)
  },

  // Union field metadata can be only one of the following:
  "textGroundingMetadata": {
    object (TextGroundingMetadata)
  }
  // End of list of possible types for union field metadata.
  "groundingScore": number
}
Fields
content

object (AssistantContent)

The content.

contentMetadata

object (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

object (TextGroundingMetadata)

Metadata for grounding based on text sources.

groundingScore
(deprecated)

number

Deprecated: Use textGroundingMetadata.segments.grounding_score instead. Grounding score if grounding happened.

TextGroundingMetadata

Grounding details for text sources.

JSON representation
{
  "segments": [
    {
      object (Segment)
    }
  ],
  "references": [
    {
      object (Reference)
    }
  ],
  "searchEntryPoints": [
    {
      object (SearchEntryPoint)
    }
  ]
}
Fields
segments[]

object (Segment)

Grounding information for parts of the text.

references[]

object (Reference)

References for the grounded text.

searchEntryPoints[]

object (SearchEntryPoint)

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

string (int64 format)

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

string (int64 format)

End of the segment, exclusive.

referenceIndices[]

integer

References for the segment.

groundingScore

number

Score for the segment.

text

string

The text segment itself.

Reference

Referenced content and related document metadata.

JSON representation
{
  "content": string,
  "documentMetadata": {
    object (DocumentMetadata)
  }
}
Fields
content

string

Referenced text content.

documentMetadata

object (DocumentMetadata)

Document metadata.

DocumentMetadata

Document metadata.

JSON representation
{
  "document": string,
  "uri": string,
  "title": string,
  "pageIdentifier": string,
  "domain": string
}
Fields
document

string

Document resource name.

uri

string

URI for the document. It may contain a URL that redirects to the actual website.

title

string

Title.

pageIdentifier

string

Page identifier.

domain

string

Domain name from the document URI. Note that the uri field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site.

SearchEntryPoint

Google Search entry point.

JSON representation
{
  "renderedContent": string
}
Fields
renderedContent

string

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 data can be only one of the following:
  "text": string,
  "inlineData": {
    object (Blob)
  },
  "file": {
    object (File)
  }
  // End of list of possible types for union field data.
}
Fields
role

string

The producer of the content. Can be "model" or "user".

Union field data. Contained data. data can be only one of the following:
text

string

Inline text.

inlineData

object (Blob)

Inline binary data.

file

object (File)

A file, e.g., an audio summary.

Blob

Inline blob.

JSON representation
{
  "mimeType": string,
  "data": string
}
Fields
mimeType

string

Required. The media type (MIME type) of the generated data.

data

string (bytes format)

Required. Raw bytes.

A base64-encoded string.

File

A file, e.g., an audio summary.

JSON representation
{
  "mimeType": string,
  "fileId": string
}
Fields
mimeType

string

Required. The media type (MIME type) of the file.

fileId

string

Required. The file ID.

ContentMetadata

Metadata for the content.

JSON representation
{
  "contentKind": enum (ContentKind),
  "contentId": string
}
Fields
contentKind

enum (ContentKind)

Type of the content. Shows which part of the answer of the research assistant this content belongs to.

contentId

string

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 contentId as the question.

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

get

Gets an AssistAnswer.