Method: projects.locations.collections.engines.assistants.deleteCachedContent

删除由 assistants.createCachedContent 创建的上下文缓存(在 TTL 之前释放存储空间)。仅限 Gemini Enterprise 客户(ASSISTANT_USER 访问权限)。

HTTP 请求

:


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

网址使用 gRPC 转码语法。

路径参数

参数
name

string

必需。处理请求的 Assistant 的资源名称。格式:projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

请求正文

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

JSON 表示法
{
  "model": string,
  "cachedContent": string
}
字段
model

string

必需。缓存所属的不透明模型 ID;必须与 assistants.createCachedContent 请求相匹配,以便代理可以解析后端。

cachedContent

string

必需。由 assistants.createCachedContent 返回的 name 的 cachedContents/{id} 资源名称段,用于标识要删除的缓存。

响应正文

如果成功,则响应正文为空的 JSON 对象。

授权范围

需要以下 OAuth 范围之一:

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

如需了解详情,请参阅 Authentication Overview。

IAM 权限

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

  • discoveryengine.assistants.assist

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