Method: projects.locations.chat

生成 Message 物件串流,回答資料相關問題。

HTTP 要求

POST https://geminidataanalytics.googleapis.com/v1beta/{parent=projects/*/locations/*}:chat

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

路徑參數

參數
parent

string

這是必要旗標,即時通訊要求的父項值。圖案:projects/{project}/locations/{location}

要求主體

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

JSON 表示法
{
  "project": string,
  "messages": [
    {
      object (Message)
    }
  ],

  // Union field context_provider can be only one of the following:
  "inlineContext": {
    object (Context)
  },
  "conversationReference": {
    object (ConversationReference)
  },
  "dataAgentContext": {
    object (DataAgentContext)
  }
  // End of list of possible types for union field context_provider.
}
欄位
project
(deprecated)

string

(選用步驟) 用於配額和帳單的 Google Cloud 專案。

messages[]

object (Message)

這是必要旗標,目前對話的內容。

聯集欄位 context_provider。即時通訊要求的 Context Provider。可以是 inline_context (要求中提供的內嵌背景資訊)、data_agent (資料代理程式資源的參照),或是 conversation_reference (使用 conversation_id 和 agent_id 參照持續進行的對話和背景資訊)。context_provider 只能是下列其中一項:
inlineContext

object (Context)

(選用步驟) 即時通訊要求的內嵌情境。您可以透過內嵌傳遞所有內容,以無狀態方式進行對話 (不含受管理對話的持續性,也不含代理程式)。

conversationReference

object (ConversationReference)

(選用步驟) 參照持續進行的對話和代理程式背景資訊。使用這項功能與服務專員進行即時通訊,並管理對話保留時間。

dataAgentContext

object (DataAgentContext)

(選用步驟) 即時通訊要求的背景資訊。使用這項功能與 Agent 無狀態地對話,不必管理對話的持續性。

回應主體

如果成功,回應主體會包含 Message 例項的串流。

授權範圍

需要下列 OAuth 範圍:

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

詳情請參閱Authentication Overview

ConversationReference

參照持續進行的對話和代理程式背景資訊。

JSON 表示法
{
  "conversation": string,
  "dataAgentContext": {
    object (DataAgentContext)
  }
}
欄位
conversation

string

這是必要旗標,對話資源名稱。格式:projects/{project}/locations/{location}/conversations/{conversationId}

dataAgentContext

object (DataAgentContext)

這是必要旗標,使用資料代理程式的即時通訊要求背景資訊。

DataAgentContext

使用資料代理程式的即時通訊要求背景資訊。

JSON 表示法
{
  "dataAgent": string,
  "credentials": {
    object (Credentials)
  },
  "contextVersion": enum (ContextVersion)
}
欄位
dataAgent

string

這是必要旗標,資料代理程式資源的名稱。

credentials

object (Credentials)

(選用步驟) 呼叫 Looker 資料來源時要使用的憑證。

目前支援 OAuth 權杖和 API 金鑰型憑證,詳情請參閱「使用 SDK 進行驗證」。

contextVersion

enum (ContextVersion)

(選用步驟) DCS 要使用的內容版本 (例如 STAGING、PUBLISHED)

ContextVersion

DCS 支援的脈絡版本清單。情境有兩個版本。這是為了維護資料代理程式的版本管理。

列舉
CONTEXT_VERSION_UNSPECIFIED 未指定或無法辨識。
STAGING 使用這個版本時,DCS 會將最新的暫存環境用於資料代理程式。
PUBLISHED 使用這個版本時,DCS 會將最新發布的內容用於資料代理程式。