触发一次异步记忆整理任务。
HTTP 201 Created
完整错误信封说明详见错误参考。
POST /api/v1/cloud/dreams
创建一个 Dream,系统将异步整理指定的 Memory Store。返回 Dream 对象。
请求头
| 头部 | 必选 | 说明 |
|---|---|---|
Authorization | 是 | Bearer <PAT> |
Content-Type | 是 | application/json |
请求体
| 字段 | 类型 | 必选 | 说明 |
|---|---|---|---|
inputs | array | 是 | 输入列表。必须包含一个 memory_store 类型输入,可选包含 sessions 类型输入。 |
model | string | 否 | 模型选择:auto(默认)、lite、ultimate。 |
instructions | string | 否 | 自定义整理指令,最长 4096 字符。 |
inputs 元素
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | "memory_store" 或 "sessions"。 |
memory_store_id | string | 当 type 为 memory_store 时必填。 |
session_ids | array | 当 type 为 sessions 时必填,最多 100 个 Session ID。 |
示例请求
示例响应
HTTP 201 Created
错误码
| HTTP | Type | 触发条件 |
|---|---|---|
| 400 | invalid_request_error | inputs 为空、缺少 memory_store 输入、重复 memory_store、sessions 超过 100 个、model 不在允许列表、instructions 超长。 |
| 401 | authentication_error | 缺少或无效的认证令牌。 |
| 404 | not_found_error | memory_store_id 引用的 Memory Store 不存在或不可访问。 |
| 409 | invalid_request_error | 用户已有一个活跃的 Dream(pending 或 running)。 |