ToolResponse

用戶端或代理程式中特定工具的執行結果。

JSON 表示法
{
  "id": string,
  "displayName": string,
  "response": {
    object
  },
  "parentToolCallId": string,
  "agentName": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "tool": string,
  "toolsetTool": {
    object (ToolsetTool)
  }
  // End of mutually exclusive fields.
}
欄位
id

string

選用。tool call 回應的相符 ID。

displayName

string

僅供輸出。工具的顯示名稱。

response

object (Struct format)

這是必要旗標,JSON 物件格式的工具執行結果。使用「output」鍵指定工具回應,並使用「error」鍵指定錯誤詳細資料 (如有)。如果未指定「output」和「error」鍵,系統會將整個「response」視為工具執行結果。

parentToolCallId

string

僅供輸出。如果是由代表父項呼叫的子代理程式發出,則為導致此呼叫的工具呼叫 ID。如果是頂層呼叫,則為空白。讓用戶端將子代理程式的工作歸類在啟動工作的呼叫下,而非將每個步驟都視為同層級。

agentName

string

僅供輸出。發出這通電話的代理名稱 (人類可讀),例如「合約架構師」。如果是由根層級代理發出,則為空白。

已執行的工具 ID。可以是持續性工具,也可以是工具集中的工具。以下列出互斥欄位。回應中最多會設定一個欄位:
tool

string

選用。要執行的工具名稱。格式:projects/{project}/locations/{location}/apps/{app}/tools/{tool}

toolsetTool

object (ToolsetTool)

選用。執行的工具集工具。

互斥欄位的結尾。