by chatmasta · 3y ago · 0 comments
EDIT: It's using EventSource. If you open the debugger and Cmd+Shift+F for `onmessage`, you'll find where it receives the message, and you can add a breakpoint, which you can then right click and change to a logpoint, to log the contents of the message. There is probably a one-liner you could paste into devtools to do some prototype hacking of window.EventSource, but I don't have time to figure that out atm, and can't find anything in a few quick searches of GitHub code.
EDIT EDIT: Just tried Safari, it does indeed show up as a spinner, but I still can't see the actual messages in DevTools.
[0] https://github.com/Yaffle/EventSource/issues/79
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=102589...
You can see the network call spin while the text loads.
edit: added name of endpoint.
{"detail":"Method Not Allowed"}
When I click on itsee 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.
https://firefox-source-docs.mozilla.org/devtools-user/networ...
[0] https://stackoverflow.com/questions/55201372/event-stream-da... [1] https://github.com/EventSource/eventsource/issues/94