Freek Van der Herten·
★ Streaming AI replies from Laravel to React
TL;DR
Waiting for complete AI replies made There There’s helpdesk chat feel sluggish. The team streams text chunks and tool-call updates from Laravel to React as newline-delimited JSON, using plain fetch with a small buffering loop and saving the finished reply. The result is a responsive chat that shows replies as they arrive and explains tool activity, without WebSockets or extra streaming libraries.