Dream オブジェクト、入出力、ステータスのスキーマ。
Dream オブジェクト
すべての Dream エンドポイントは Dream オブジェクトを返します。
| フィールド | 型 | 説明 |
|---|---|---|
id | string | Dream ID(drm_ プレフィックス) |
type | string | 常に "dream" |
status | string | Dream ステータス、Dream ステータス を参照 |
inputs | array | 入力リスト、Dream input を参照 |
outputs | array | 出力リスト、Dream output を参照 |
model | object | 保存されたモデル設定。Dream model を参照 |
instructions | string | カスタム整理指示、UTF-8 エンコード後に最大 4096 バイト(1 文字が複数バイトを使用する場合があります) |
session_id | string または null | 関連する Dreaming Session ID(実行開始後に設定) |
usage | object | トークン使用統計 |
error | object または null | 失敗時のエラー詳細 |
created_at | string | UTC 作成時刻(ISO 8601) |
ended_at | string または null | UTC 終了時刻(終了状態のみ) |
archived_at | string または null | UTC アーカイブ時刻 |
Dream model
リクエストでは互換性のため文字列 ID も使用できます。Dream レスポンスの model は常にオブジェクトです。
| フィールド | 型 | 説明 |
|---|---|---|
id | string | 保存されたモデル ID。auto はデフォルトのルーティングを表します |
effort | string | 任意。明示的に設定した場合のみ返されます。正規値は none、low、medium、high、xhigh、max です。明示的な none は省略されず保持されます |
context_window | integer | 任意。明示的に設定した場合のみ返されます。単位はトークンです |
{"id":"auto"} のようなオブジェクトを返し、オプションを補完しません。作成、取得、一覧、キャンセル、アーカイブの各レスポンスは同じ保存済み設定を返します。これは保存された選択であり、最終的にルーティングされたモデル、実際のコンテキスト使用量、トークン使用量を表すものではありません。過去の Dream の取得時に現在のモデルカタログで再検証することはありません。
リクエストの検証、利用可能なオプション、auto の動作は Dream の作成 を参照してください。
Dream ステータス
| 値 | 説明 |
|---|---|
pending | 作成済み、実行待ち |
running | メモリ整理を実行中 |
completed | 整理完了、結果は outputs に格納 |
failed | 実行失敗、原因は error を参照 |
canceled | ユーザーによりキャンセル |
Dream input
inputs 配列の各要素:
| type の値 | 必須フィールド | 説明 |
|---|---|---|
memory_store | memory_store_id | 入力 Memory Store を指定(必須、1 件のみ) |
sessions | session_ids | 優先する Session を指定(任意、最大 100 件) |
Dream output
完了後、outputs 配列の要素:
| フィールド | 型 | 説明 |
|---|---|---|
type | string | 常に "memory_store" |
memory_store_id | string | 整理後の出力 Memory Store ID |
files_touched | array | 作成・変更・削除されたメモリファイルのパス |
Dream usage
| フィールド | 型 | 説明 |
|---|---|---|
input_tokens | integer | 入力トークン数 |
output_tokens | integer | 出力トークン数 |
cache_creation_input_tokens | integer | キャッシュ作成トークン数 |
cache_read_input_tokens | integer | キャッシュ読み込みトークン数 |
Dream error
失敗時に返されるエラーオブジェクト:
| フィールド | 型 | 説明 |
|---|---|---|
type | string | エラー種別(例: "no_output"、"internal_error") |
message | string | エラー説明 |