ChatGPT-API-server icon indicating copy to clipboard operation
ChatGPT-API-server copied to clipboard

Propose of this server

Open RicardAparicio opened this issue 3 years ago • 5 comments

First of all, sorry for my ignorance. I haven't clear the propose of this server, I was expecting a server API to can request directly to it the asking sentences in the same way the official webpage does to their backend, but I don't see any reference to chat.openai.com/backend-api endpoints in the code. Looks like it is built to synchronize with an Agent somehow? Why then it is necessary? I'm missing many things.

Could you explain me more in detal how is it supposed to work? Always with an Agent? what's the role of this server? I would appreciate it so much :)

RicardAparicio avatar Dec 26 '22 10:12 RicardAparicio

The issue:

  • Cloudflare blocks can only be bypassed with a browser
  • Rate limiting has increased
  • OpenAI blocks IP addresses of VPS / hosted servers

My solution:

  • Host API on VPS/server
  • Run agents on local devices such as PC or Raspberry Pi via browser. This bypasses the IP blocks and cloudflare
  • Multiple accounts can connect to a single API server. This gets around rate limits by cycling through connections

Further proposal:

  • A public community API can be made where everyone can congregate their account resources and make a large connection pool. This will allow much faster response times and also higher stability that is not affected by a single connection error.

acheong08 avatar Dec 26 '22 10:12 acheong08

All interaction to ChatGPT's API is done on the agent side. The server is simply a remote endpoint that can pool connections

acheong08 avatar Dec 26 '22 10:12 acheong08

Using websockets, requests to the server can be instantly forwarded to the agents even if they're behind a NAT

acheong08 avatar Dec 26 '22 10:12 acheong08

Will this allow for conversations still?

PortRoyale avatar Jan 02 '23 22:01 PortRoyale

Yes. Conversations are linked to connections

acheong08 avatar Jan 03 '23 01:01 acheong08