Method: projects.locations.collections.engines.sessions.selectContextFiles

选择要在会话中使用的上下文文件。

HTTP 请求

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}:selectContextFiles

网址采用 gRPC 转码语法。

路径参数

参数
name

string

必需。会话的名称。

格式:projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "fileSelections": [
    {
      object (FileSelection)
    }
  ]
}
字段
fileSelections[]

object (FileSelection)

必需。文件选择发生变化。只能选择(或取消选择)之前已上传到会话中的文件。此处未提及的文件将保持其当前的选择状态。

响应正文

如果成功,则响应正文为空。

授权范围

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

IAM 权限

需要拥有 name 资源的以下 IAM 权限:

  • discoveryengine.sessions.selectContextFiles

如需了解详情,请参阅 IAM 文档

FileSelection

上下文文件的选择状态。

JSON 表示法
{
  "fileId": string,
  "selected": boolean
}
字段
fileId

string

必需。上下文文件的 ID。

selected

boolean

必需。相应文件是否已选择在会话中使用。