Request/response
Also: 請求回應 · 一問一答 · stateless · 無狀態
One round trip: you send a request, the server sends a response, and the connection can close — it does not remember your previous call.
When you will meet it
This is why chat history must be resent on every call. Model APIs are stateless: if you do not include the earlier turns, the model treats you as a stranger. Miss this and you will think the AI randomly lost its memory.
An analogy
Like calling a support line where the agent forgets every call: each time you must recap "where we left off". The fuller the recap, the better the answer; leave something out and they can only guess from what they just heard.
Minimal example
第一次:
送 →「幫我改這段程式」
收 ←「好,這是改好的版本」
第二次(伺服器已忘記第一次):
送 →「再幫我把縮排改成兩個空格」 ← 它不知道「這段程式」是哪段
正確做法:第二次把第一次的問與答一起送過去
送 → [使用者:改程式][助手:改好的版本][使用者:縮排改兩格]The conversation history is not stored for you by the server; you rebuild and resend the whole thing every time. That is also why longer chats cost more and get slower — each call carries more.
What people get wrong
- Assuming the server remembers your last message. It does not. Statelessness is by design, not a bug — it lets any server pick up your request.
- Reading stateless as "the server has no memory at all". Precisely: one request does not automatically carry the previous one; whether to remember is up to the application layer (resend history, or use a session).
Related terms
Next
- 第一次呼叫 LLM API:Token、計費與常見錯誤21 minChinese only