Method: projects.locations.collections.engines.assistants.agents.a2a.v1.tasks.subscribe

tasks.subscribe 是一种流式调用,将返回任务更新事件的流。这会将流附加到现有进程内任务。如果任务已完成,则该流将返回已完成的任务(如 tasks.get),并关闭该流。

HTTP 请求

:


GET https://discoveryengine.googleapis.com/v1/{tenant=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*}/a2a/v1/{name=tasks/*}:subscribe

网址使用 gRPC 转码语法。

路径参数

参数
tenant

string

可选的租户,以路径参数形式提供。实验性,在 1.0 版发布之前可能仍会发生变化。

name

string

要订阅的任务的资源名称。格式:tasks/{taskId}

请求正文

请求正文必须为空。

响应正文

如果成功,响应正文将包含 StreamResponse 实例数据流。

授权范围

需要以下 OAuth 范围之一:

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

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