Grok WorldGrok Build CLI field station

回顧期號 / STREAM

用 state machine 呈現 streaming

把 start、typed delta、tool activity、completion、cancellation 與 failure 建成獨立 state,而非只累加文字。

01 / DECIDE

架構決策

當 first-token feedback 重要,且介面在長 reasoning 中仍需 responsive 時採用。

把 start、typed delta、tool activity、completion、cancellation 與 failure 建成獨立 state,而非只累加文字。 先把 input、output、state、tool 與 side effect 畫成一條可觀察路徑,再決定 用 state machine 呈現 streaming 的 owner。

02 / OPERATE

三步野戰程序

  1. 01

    鎖定合約

    寫下 caller、資料分類、成功條件、timeout、取消與 ownership。當 first-token feedback 重要,且介面在長 reasoning 中仍需 responsive 時採用。

  2. 02

    執行有界路徑

    只建立一條 end-to-end path,保留 correlation、typed state 與 reversible failure。把 start、typed delta、tool activity、completion、cancellation 與 failure 建成獨立 state,而非只累加文字。

  3. 03

    驗證訊號

    把驗收變成可重跑的 fixture、contract test 或 browser test。Browser test 涵蓋 abort、reconnect、malformed event、slow consumer 與 terminal cleanup。

03 / BOUND

Operation 邊界

Partial output 不是 final evidence,不可觸發不可逆動作。

04 / PROVE

驗收證據

Browser test 涵蓋 abort、reconnect、malformed event、slow consumer 與 terminal cleanup。

SOURCE / HTTP

可重現來源探針

curl -fsSI 'https://docs.x.ai/developers/model-capabilities/text/streaming' | sed -n '1,5p'

PRIMARY / OFFICIAL

xAI 官方來源

來源核對 · 2026-08-10

  1. 01Streaming