Method: projects.locations.apps.chatAiAssistant

為指定的助理工作階段執行 AI 助理 Arc。

HTTP 要求

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

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

路徑參數

參數
app

string

這是必要旗標,要執行助理的應用程式。格式:projects/{project}/locations/{location}/apps/{app}

要求主體

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

JSON 表示法
{
  "assistantSession": string,
  "message": string,
  "attachedGcsUris": [
    string
  ],
  "contextToken": string
}
欄位
assistantSession

string

這是必要旗標,用於執行助理的助理工作階段。格式:projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistantSession}

message

string

這是必要旗標,要傳送給助理代理的訊息。

attachedGcsUris[]

string

選用。使用者在這輪對話上傳檔案的 Cloud Storage URI。範例:「gs://cxas-transient-uploads/uuid/prd.pdf」

contextToken

string

選用。SessionService.GenerateOnboardingSuggestions 傳回的不透明新手上路脈絡詞元。如果設定且仍為最新狀態,伺服器會重複使用為零狀態運算的新手上路快照,而不是為第一個對話輪次重新運算。

回應主體

AssistantService.ChatAiAssistant 的回應訊息。

如果成功,回應主體會含有以下結構的資料:

JSON 表示法
{
  "eventId": string,
  "eventTime": string,
  "uiEvent": {
    object (UiEvent)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "textChunk": string,
  "statusMessage": string,
  "sessionCheckpoint": {
    object (SessionCheckpoint)
  }
  // End of mutually exclusive fields.
}
欄位
eventId

string

事件的專屬 ID。

eventTime

string (Timestamp format)

事件發生時的時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

uiEvent

object (UiEvent)

選用。UI 事件酬載。

事件酬載。以下是互斥欄位清單。回應中最多會設定下列其中一個欄位:
textChunk

string

文字詞元 (用於逐字串流 Gemini 回覆)

statusMessage

string

簡單的狀態更新

sessionCheckpoint

object (SessionCheckpoint)

工作階段檢查點/壓縮摘要事件,包含使用者意圖和滾動摘要。

互斥欄位結束。

授權範圍

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

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

詳情請參閱Authentication Overview。

IAM 權限

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

  • ces.apps.update

詳情請參閱 IAM 說明文件。