Closed leejay001 closed 7 months ago
Same error messages ({"status":false,"error":{"message":"Error getting a new session, If this error persists, your country may,...
) here. I use node v20.12.2
directly to deploy the whole thing. My VPS is in US. I can use my VPS as a proxy to access chat.openai.com without any problem.
It will be greadly appreciated if a fix can be suggested.
VPS can't be used, Cloudflare will block you, you have to host it locally or use a resedental IP/Proxy
I have deployed an instance on a VPS located in the USA using Docker. The command used for deployment was:
docker run -dp 127.0.0.1:3040:3040 pawanosman/chatgpt:latest Nginx Configuration: My Nginx is configured as follows to proxy requests to the Docker container:
nginx location /xxx/xxx/ { proxy_pass http://localhost:3040/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } Issue Description: When attempting to access the service through the domain https://domain.com/xxx/xxx/v1/chat/completions, I receive the following error message:
{ "status": false, "error": { "message": "Error getting a new session, If this error persists, your country may not be supported yet. If your country was the issue, please consider using a U.S. VPN or a U.S. residential proxy.", "type": "invalid_request_error" }, "support": "https://discord.pawan.krd" }
Attempted Solutions:
Ensuring that the Docker container is properly running and accessible locally. Confirming that the Nginx proxy settings are correctly configured to forward headers. Questions:
Could there be an issue with how Nginx is handling the IP forwarding that affects session creation? Are there any additional configurations or steps that I might be missing?