REST Resource: projects.locations.collections.engines.assistants.cannedQueries

Resource: CannedQuery

Canned query resource of Assistant. It represents a short-cut to a predefined conversation start.

JSON representation
{
  "name": string,
  "displayName": string,
  "defaultTexts": {
    object (CannedQueryTexts)
  },
  "localizedTexts": {
    string: {
      object (CannedQueryTexts)
    },
    ...
  },
  "activationBehavior": enum (ActivationBehavior),
  "requiredCapabilities": [
    {
      object (AssistantCapability)
    }
  ],
  "icon": string,
  "enabled": boolean,
  "googleDefined": boolean
}
Fields
name

string

Immutable. Resource name of the canned query. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{cannedQuery}

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

displayName

string

The display name of the canned query. It must be a UTF-8 encoded string with a length limit of 128 characters.

defaultTexts

object (CannedQueryTexts)

Required. The default (non-localized) values for the text attributes.

localizedTexts

map (key: string, value: object (CannedQueryTexts))

Optional. The translations of the text attributes. The keys should be BCP-47 language codes.

activationBehavior

enum (ActivationBehavior)

The behaviour when this canned query is activated.

requiredCapabilities[]

object (AssistantCapability)

Optional. The capabilities the Assistant needs to have to use this canned query.

icon

string

The name of the icon from the Google Symbols library for the canned query.

enabled

boolean

Whether this canned query is enabled.

googleDefined

boolean

Output only. Whether this is a Google-defined, read-only canned query.

CannedQueryTexts

The text pieces for the canned query, which can be localized.

JSON representation
{
  "title": string,
  "description": string,

  // Union field start_message can be only one of the following:
  "suggestedUserQuery": string,
  "assistantMessage": string,
  "userQuery": string
  // End of list of possible types for union field start_message.
}
Fields
title

string

Required. The title that is for the end user.

description

string

Required. The description that is for the end user.

Union field start_message. The message the canned query will use as conversation start. start_message can be only one of the following:
suggestedUserQuery
(deprecated)

string

Deprecated. Use userQuery instead. The canned text for the suggested first turn of the user (e.g., "generate a cat image")

assistantMessage

string

The canned text for the first turn for the assistant. This will be displayed to the user, likely asking for input (e.g., "What kind of content would you like to create? (e.g., email, article, presentation)").

userQuery

string

The canned text for the first turn for the user.

ActivationBehavior

The behaviour when this canned query is activated.

Enums
ACTIVATION_BEHAVIOR_UNSPECIFIED Default value, should not be used. Default is NEW_SESSION.
NEW_SESSION When using this canned query, a new assistant session is started.
NEW_RESEARCH_ASSISTANT_SESSION When using this canned query, a new research assistant session is started.

AssistantCapability

Capability of an assistant needed to use this canned query.

JSON representation
{

  // Union field capability can be only one of the following:
  "actionName": string
  // End of list of possible types for union field capability.
}
Fields
Union field capability. Capability of an assistant, either an action or a tool. capability can be only one of the following:
actionName

string

The name of the action that the Assistant needs to have set up to use this canned query.

Methods

create

Creates a CannedQuery.

delete

Deletes a CannedQuery.

get

Gets a CannedQuery.

list

Lists all CannedQuerys under an Assistant.

listActiveCannedQueryUserViews

Lists the CannedQueryUserViews for all active CannedQuerys.

patch

Updates a CannedQuery.