Adding Key Pool and Multi-Key Polling to ChatGPT Next Web
Multi-key polling is already supported by default in #2ad5ec2, so no manual modification or addition is needed.
Key Pool
A so-called Key Pool allows the use of multiple API keys to overcome the concurrency limitations of a 5 key is limited to three requests per minute. By adding a Key Pool, this limit can be bypassed, significantly improving the website's response speed.
Adding a Key Pool to Enable Multi-Key Polling
Since the project itself does not integrate any database, modifications are relatively simple.
- Open
/app/config/server.ts - Original code

1847822618.png
- Change it to the following

3684846479.png
- On Vercel, modify the environment variable
OPENAI_API_KEYto include multiple OpenAI API keys separated by English commas (e.g., sk-xxxx1,sk-xxxx2,sk-xxx3), then redeploy.