Appearance
停止响应
停止正在执行的 ChatFlow 任务。调用成功后,原 SSE 连接会收到 cancelled 事件并关闭;如果工作流取消状态已先返回,还会收到 workflow.finished(status 为 cancelled)。
- 接口路径:
POST /v1/openapi/chat/stop
INFO
此接口与 Agent、AgentLite 和 TextCompletion 共用同一路径,通过 task_id 定位要停止的任务。
请求头
| 参数名 | 必填 | 说明 |
|---|---|---|
| Content-Type | 是 | application/json |
| Authorization | 是 | 鉴权凭证,格式 Bearer sk_xxx |
请求参数
json
{
"task_id": "01965de1-1920-7fe4-aa38-2e6836c46f24"
}| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| task_id | string | 是 | 任务 ID,由发送消息接口的 start 事件或阻塞响应返回 |
响应示例
json
{
"code": 200,
"message": "success",
"data": {}
}