openai-proxy-docker provides an OpenAI API proxy server image by Docker
Just:
sudo docker run -d -p 9017:9017 shawnai/openai-proxy-docker:latestThen, you can use it by YOURIP:9017
For example, the proxied OpenAI Chat Completion API will be:
YOURIP:9017/v1/chat/completionsIt should be the same as
api.openai.com/v1/chat/completions
For detailed usage of OpenAI API, please check: API Reference
Use PM2 to scale up this proxy application accross CPU(s):
- Listing managed processes
docker exec -it <container-id> pm2 list
- Monitoring CPU/Usage of each process
docker exec -it <container-id> pm2 monit
- 0sec downtime reload all applications
docker exec -it <container-id> pm2 reload all