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

如果数据源未提供内容类型,则此字段为必需字段。

响应正文

如果成功,则响应正文包含一个 ImportAgentFileResponse 实例。

授权范围

需要以下 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