This commit is contained in:
seb
2026-10-05 22:27:23 +02:00
parent af0ef29e22
commit 18699eb40b
7 changed files with 61 additions and 50 deletions

View File

@@ -5,11 +5,11 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Stream conversation events (SSE)
Opens a Server-Sent Events stream for the specified conversation.
Streams `message` events (persisted user/assistant messages), live `delta`
text chunks of the model answer, and `state` events (`thinking`, `working`,
`done`). The SSE states are not stored; the database only knows `idle`/`busy`.
`done` carries `usage` (`input`, `cached`, `output`, `cost`) on success or
`error` (string) if the run failed.
Streams live `delta` text chunks of the model answer, `usage` stats per turn,
and `state` events (`thinking`, `connected`, `firstevent`, `reasoning`,
`content`, `working`, `toolcall`, `done`). The SSE states are not stored;
the database only knows `idle`/`busy`.
`done` indicates generation has finished, carrying `error` (string) only if the run failed.
## Path parameters
@@ -20,7 +20,7 @@ text chunks of the model answer, and `state` events (`thinking`, `working`,
## Response `200`
SSE stream (`text/event-stream`). Emits `state`, `delta`, and `message` events.
SSE stream (`text/event-stream`). Emits `state`, `delta`, and `usage` events.
## Errors