Chat Stream
POST/api/websites/:site_id/builder/chat
Stream one chat turn as Server-Sent Events.
When WEBSITE_BUILDER_STREAM_REATTACH is enabled we ALSO:
- Insert a row in
website_builder_turnsso the reattach probe can find this turn by (site_id, status=in_flight). - Tee every SSE event into
builder:turn:{turn_id}(Redis stream) so a reattaching client can replay past + future events. - Inject the
turn_idinto the firststartevent so the original client can also hand it to a freshly-mounted hook in another tab. All Redis ops are best-effort: a Redis failure DOES NOT break the user-facing SSE response. Worst case the user just doesn't get reattach for this one turn.
Request
Responses
- 200
- 422
Successful Response
Validation Error