Method: projects.locations.apps.assistantSessions.create

在指定應用程式中建立新的助理工作階段。

HTTP 要求

POST https://ces.googleapis.com/v1beta/{parent=projects/*/locations/*/apps/*}/assistantSessions

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
parent

string

這是必要旗標,要建立助理工作階段的應用程式,格式:projects/{project}/locations/{location}/apps/{app}

要求主體

要求主體包含下列結構的資料:

JSON 表示法
{
  "assistantSessionId": string,
  "assistantSessionMessages": [
    {
      object (AssistantMessage)
    }
  ]
}
欄位
assistantSessionId

string

選用。要用於助理工作階段的 ID,會成為助理工作階段資源名稱的最終元件。如未提供,系統會自動為助理工作階段指派專屬 ID。

assistantSessionMessages[]

object (AssistantMessage)

選用。用於啟動助理工作階段的訊息。

回應主體

如果成功,回應主體會包含新建立的 AssistantSession 執行個體。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/ces

詳情請參閱Authentication Overview。

IAM 權限

需要 parent 資源的下列 IAM 權限:

  • ces.assistantSessions.create

詳情請參閱 IAM 說明文件。