从智能体获取任务的当前状态。
HTTP 请求
GET https://discoveryengine.googleapis.com/v1/{tenant=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*}/a2a/v1/{name=tasks/*}
网址采用 gRPC 转码语法。
路径参数
| 参数 | |
|---|---|
tenant |
可选租户,以路径参数的形式提供。实验性功能,在 1.0 版发布后可能仍会发生变化。 |
name |
必需。任务的资源名称。格式:tasks/{taskId} |
查询参数
| 参数 | |
|---|---|
historyLength |
要检索的任务历史记录中最近的消息数。 |
请求正文
请求正文必须为空。
响应正文
如果成功,则响应正文包含一个 Task 实例。
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/discoveryengine.readwritehttps://www.googleapis.com/auth/discoveryengine.serving.readwrite
如需了解详情,请参阅 Authentication Overview。