GPT WORLD / INDEPENDENT CODEX FIELD MANUAL 來源檢視 · 2026-07-31

回顧期號 / STATE

明確選擇 conversation state

決定 application 要重送 history、串接 response identifier,或使用 conversation resource,並把選擇寫入 data policy。

01 / DECIDE

架構決策

適合 continuity、deletion、audit 與跨裝置行為都要可預測的 multi-turn 產品。

決定 application 要重送 history、串接 response identifier,或使用 conversation resource,並把選擇寫入 data policy。 先把 input、output、state 與 side effect 畫成一條可觀察路徑,再決定 明確選擇 conversation state 要放在哪一層。

02 / BUILD

三步實作

  1. 01

    框定合約

    先寫下 caller、資料分類、成功條件、timeout、取消與 ownership。適合 continuity、deletion、audit 與跨裝置行為都要可預測的 multi-turn 產品。

  2. 02

    建立單一路徑

    只實作一條 end-to-end path,保留 request correlation、typed state 與可逆 failure handling。決定 application 要重送 history、串接 response identifier,或使用 conversation resource,並把選擇寫入 data policy。

  3. 03

    證明結果

    把驗收寫成可重跑的 fixture、contract test 或 browser test。Lifecycle test 涵蓋 new、continue、fork、expire、delete、export 與 unauthorized access。

03 / BOUND

Production 邊界

不可假設 provider-side state 等同 user account、authorization 或法定 retention requirement。

04 / PROVE

驗收證據

Lifecycle test 涵蓋 new、continue、fork、expire、delete、export 與 unauthorized access。

SOURCE / HTTP

可重現來源探針

curl -fsSI 'https://developers.openai.com/api/docs/guides/conversation-state' | sed -n '1,5p'