Hi There,
I create one reactive web app , it will invoke the openai by use stream=true. It will out AI result by streaming . How can I get it ?
Many Thanks,
Jack
Hi @Jack Bao,
You cannot consume stream=true OpenAI responses directly via a standard OutSystems REST integration and get partial tokens. OutSystems REST consumers buffer the full HTTP response, so streamed SSE chunks are not exposed incrementally to the Reactive UI.
To actually get streaming output in the UI, you must use Server‑Sent Events (SSE) or WebSockets, with a server-side proxy.
Solution:
Step 1: Create a server-side proxy
This proxy can be:
What the proxy does
Step 2: SSE Reactive Client (Forge)
This Forge component is built specifically for this:
Step 3: Update the UI incrementally
For each SSE message:
Hope this helps,
Cheers,
Saugat
One thing worth noting is why stream=true doesn't work through a standard consumed REST API.
OpenAI returns Server-Sent Events incrementally, but OutSystems REST integrations buffer the response and only return control when the request completes.
Because of that, the Reactive UI never receives the intermediate chunks. That's why a streaming-capable proxy (SSE or WebSocket) is required between OpenAI and the browser. Also, keep the OpenAI API key in the proxy layer rather than exposing it to the client.