RunSessionResponse

SessionService.RunSession 的回應訊息。

JSON 表示法
{
  "outputs": [
    {
      object (SessionOutput)
    }
  ]
}
欄位
outputs[]

object (SessionOutput)

工作階段的輸出內容。

SessionOutput

工作階段的輸出內容。

JSON 表示法
{
  "turnIndex": integer,
  "turnCompleted": boolean,
  "diagnosticInfo": {
    object (SessionOutput.DiagnosticInfo)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "text": string,
  "audio": string,
  "toolCalls": {
    object (ToolCalls)
  },
  "citations": {
    object (Citations)
  },
  "googleSearchSuggestions": {
    object (GoogleSearchSuggestions)
  },
  "endSession": {
    object (EndSession)
  },
  "payload": {
    object
  },
  "image": {
    object (Image)
  },
  "progress": string
  // End of mutually exclusive fields.
}
欄位
turnIndex

integer

表示這個輸出內容所屬的對話輪次順序,從 1 開始。

turnCompleted

boolean

如果是 true,表示 CES 代理程式已偵測到目前對話回合結束,因此不會再提供這個回合的輸出內容。

diagnosticInfo

object (SessionOutput.DiagnosticInfo)

選用。診斷資訊包含處理輸入內容時的執行詳細資料。只有在每個回合的最後一個 SessionOutput (含 turnCompleted=true) 中填入。

輸出內容的類型。以下列出互斥欄位。回應中最多會設定一個欄位:
text

string

CES 代理的輸出文字。

audio

string (bytes format)

從 CES 代理程式輸出音訊。

Base64 編碼字串。

toolCalls

object (ToolCalls)

要求客戶執行工具。

citations

object (Citations)

引文:提供服務專員生成文字的來源資訊。

googleSearchSuggestions

object (GoogleSearchSuggestions)

Google 搜尋因叫用 GoogleSearchTool 而傳回的建議。

endSession

object (EndSession)

表示工作階段已結束。

payload

object (Struct format)

自訂酬載,內含 CES 代理的結構化輸出內容。

image

object (Image)

CES 服務專員輸出的圖片。

progress

string

CES 服務專員傳送的中間進度更新。

互斥欄位的結尾。

ToolCalls

要求用戶端執行工具並傳回執行結果,然後再繼續工作階段。

JSON 表示法
{
  "toolCalls": [
    {
      object (ToolCall)
    }
  ]
}
欄位
toolCalls[]

object (ToolCall)

選用。要執行的工具呼叫清單。

EndSession

表示工作階段已終止,可能是因為順利完成 (例如使用者說「再見!」) 或提報給專員。

工作階段終止後,代理程式不會再處理任何輸入內容,且用戶端應在收到代理程式的所有剩餘回應後,半關閉並中斷連線。

JSON 表示法
{
  "metadata": {
    object
  }
}
欄位
metadata

object (Struct format)

選用。提供工作階段結束信號的額外資訊,例如結束工作階段的原因。

SessionOutput.DiagnosticInfo

包含處理期間的執行詳細資料。

JSON 表示法
{
  "messages": [
    {
      object (Message)
    }
  ],
  "rootSpan": {
    object (Span)
  }
}
欄位
messages[]

object (Message)

處理期間發生的訊息清單。

rootSpan

object (Span)

整個要求處理程序的追蹤記錄,以根範圍表示。這個時距可以包含特定作業的巢狀子時距。