Method: projects.locations.collections.engines.assistants.agents.files.import

將檔案匯入 Agent。目前僅支援無程式碼代理程式。

HTTP 要求

POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*}/files:import

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

路徑參數

參數
parent

string

這是必要旗標,Agent 的資源名稱。格式:projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}

要求主體

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

JSON 表示法
{
  "fileName": string,
  "mimeType": string
}
欄位
fileName

string

這是必要旗標,檔案名稱。

mimeType

string

(選用步驟) 檔案的內容類型,請參閱 https://www.iana.org/assignments/media-types/media-types.xhtml

如果資料來源未提供內容類型,則此為必填欄位。

回應主體

AgentService.ImportAgentFile 方法的回應。

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

JSON 表示法
{
  "agentFile": {
    object (AgentFile)
  }
}
欄位
agentFile

object (AgentFile)

匯入的 AgentFile

授權範圍

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

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

詳情請參閱Authentication Overview

AgentFile

說明代理程式在每次呼叫時,內部使用的檔案做為背景資訊。

JSON 表示法
{
  "name": string,
  "fileName": string,
  "mimeType": string
}
欄位
name

string

ID。檔案的資源名稱。格式:projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}/files/{file}

fileName

string

這是必要旗標,檔案名稱。

mimeType

string

不可變更。檔案的內容類型。