Dream 数据结构

更新时间:
复制 MD 格式

Dream 对象、输入输出和状态的复用结构。

Dream 对象

创建、查询、列表、取消和归档接口都会返回 Dream 对象。

字段

类型

说明

id

string

Dream 唯一标识,前缀为 drm_

type

string

固定值 "dream"

status

string

Dream 当前状态,见 Dream status

inputs

array

Dream input 数组,见 Dream input

outputs

array | null

Dream output 数组;未完成时为 null。见 Dream output

model

string

执行 Dream 使用的模型 ID

instructions

string | null

自定义指令,用于引导 Dream 的整合方向

session_id

string | null

关联的 Session ID;无关联时为 null

usage

object | null

Token 用量统计;未完成时为 null。见 Dream usage

error

object | null

错误信息;未失败时为 null。见 Dream error

created_at

string

创建时间(ISO 8601)

ended_at

string | null

结束时间(ISO 8601);仍在运行时为 null

archived_at

string | null

归档时间(ISO 8601);未归档时为 null

Dream status

说明

pending

Dream 已创建,等待执行

running

Dream 正在处理输入并生成输出

completed

Dream 已成功完成

failed

Dream 执行失败,详见 error 字段

canceled

Dream 被用户取消

Dream input

inputs 数组中的每个元素:

type 值

必填字段

说明

memory_store

memory_store_id

将指定 Memory Store 作为 Dream 的输入数据源

sessions

session_ids

将指定 Session 的对话历史作为输入

Dream output

Dream 完成后,outputs 数组中的元素:

字段

类型

说明

type

string

固定值 "memory_store"

memory_store_id

string

输出写入的 Memory Store ID

files_touched

integer

Dream 过程中创建或修改的文件数量

Dream usage

字段

类型

说明

input_tokens

integer

输入 token 总数

output_tokens

integer

输出 token 总数

cache_creation_input_tokens

integer

用于创建缓存的输入 token 数

cache_read_input_tokens

integer

从缓存读取的输入 token 数

Dream error

失败时返回的错误对象:

字段

类型

说明

type

string

错误类型标识

message

string

可读的错误描述信息