terminalcommandnewsletter / everything-chatgpt

🔍 Explore what happens under the hood with the ChatGPT web app, its backend API calls and more. And some speculation, of course.
Creative Commons Attribution Share Alike 4.0 International
576 stars 29 forks source link

Correction: #4

Closed Snarik closed 1 year ago

Snarik commented 1 year ago

Is there an existing issue for this?

Section for Correction

Chat API flow.

Correction

I'm not in the mood to create a fork of this repo, and you've disabled branches/PRs the way normal public repos do things, but here's some additional color to explain to your users how the endpoints work.

In the README.md at line 269 I recommend adding the following information:

This request begins it's life as an a POST request, but is transitioned to an EventStream-- most likely with a library like [fetch-event-source](https://github.com/Azure/fetch-event-source.).
Data is streamed from the `/conversation` endpoint until some done state is achieved, at which point the SSE connection closes. 
The data that came off the event listener is set as a local state in the UI and is subsequently passed to the moderations endpoint for approval. 

CONTRIBUTING.md

Snarik commented 1 year ago

I would also update line 253, removing the parenthetical that there is no response, as there is one-- it's just ephemeral.

terminalcommandnewsletter commented 1 year ago

Thanks for the correction! I'll add this to the repo soon.

terminalcommandnewsletter commented 1 year ago

I've added the response of the /backend-api/conversation API to the repo as per this issue.

https://github.com/terminalcommandnewsletter/everything-chatgpt/blob/main/README.md?plain=1#L253-L272