全部產品
Search
文件中心

Qoder CN 系列:Dream 資料結構

更新時間:Jul 15, 2026

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

可讀的錯誤描述資訊