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

資源:罐頭查詢

已儲存的查詢資源 Assistant。它代表了一種通往預設對話開端的捷徑。

JSON 表示法
{
  "name": string,
  "displayName": string,
  "defaultTexts": {
    object (CannedQueryTexts)
  },
  "localizedTexts": {
    string: {
      object (CannedQueryTexts)
    },
    ...
  },
  "requiredCapabilities": [
    {
      object (AssistantCapability)
    }
  ],
  "enabled": boolean,
  "googleDefined": boolean
}
欄位
name

string

不可變動。預設查詢的資源名稱。格式:projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{cannedQuery}

必須是 UTF-8 編碼的字串,長度上限為 1024 個字元。

displayName

string

預設查詢的顯示名稱。必須是 UTF-8 編碼的字串,長度上限為 128 個字元。

defaultTexts

object (CannedQueryTexts)

這是必要旗標,文字屬性的預設(非本地化)值。

localizedTexts

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

選用。文字屬性的翻譯。索引鍵應為 BCP-47 語言代碼。

requiredCapabilities[]

object (AssistantCapability)

選用。使用這項罐頭查詢時,Google 助理必須具備的功能。

enabled

boolean

罐頭查詢是否已啟用。

googleDefined

boolean

僅供輸出。這是否為 Google 定義的唯讀罐頭查詢。

CannedQueryTexts

罐頭查詢的文字片段,可進行本地化。

JSON 表示法
{
  "title": string,
  "prefix": string,
  "suggestedPrompts": [
    {
      object (SuggestedPrompt)
    }
  ]
}
欄位
title

string

這是必要旗標,提供給使用者的標題。

prefix

string

選用。suggestedPrompts 的開頭前置字串。

suggestedPrompts[]

object (SuggestedPrompt)

這是必要旗標,預設查詢將向使用者提供的提示。

SuggestedPrompt

罐頭查詢的建議提示。

JSON 表示法
{
  "promptText": string
}
欄位
promptText

string

這是必要旗標,建議提示的文字。

AssistantCapability

助理需要具備使用此預設查詢的能力。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "actionName": string
  // End of mutually exclusive fields.
}
欄位
助理的功能,可以是動作或工具。以下列出互斥的欄位。回應中最多只會設定一個欄位:
actionName

string

助理必須設定的動作名稱,才能使用這個罐頭查詢。

互斥欄位的結尾。

方法

create

建立 CannedQuery。

delete

刪除 CannedQuery。

get

取得 CannedQuery。

list

列出 Assistant 下的所有 CannedQuery。

listActiveCannedQueryUserViews

列出所有有效 CannedQuery 的 CannedQueryUserView。

patch

更新 CannedQuery。