News for hackers. Stuff that matters.
Re:Everything ChatGPT – under the hood of the ChatGPT web app by qqqturing2 on Thursday March 23, 2023 @06:40AM (#35272636)
they are using Server Side Events (SSE) to stream the text.

see API docs: https://platform.openai.com/docs/api-reference/chat/create

> If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. See the OpenAI Cookbook for example code.

Re:Everything ChatGPT – under the hood of the ChatGPT web app by czx4f4bd on Thursday March 23, 2023 @09:05AM (#35274107)
Interesting. Apparently server-sent events show up in devtools under the network tab as multiple responses sent for the same request.

https://firefox-source-docs.mozilla.org/devtools-user/networ...

https://stackoverflow.com/a/46075339/6417784