Q: I am getting ChatGPT response error: Empty response error. How to fix?
A: Your server is probably blocking outgoing requests to the ChatGPT API.
You can check this by running the following command on the server:
(Paste your OpenAI API token here before run)
curl --head --silent -H "Authorization: Bearer YOUR_API_TOKEN" https://api.openai.com/v1/engines

A successful response will look like this:
Code:
HTTP/2 200
date: Thu, 27 Apr 2023 13:59:40 GMT
content-type: application/json
content-length: 8682
openai-version: 2020-10-01
x-request-id: aa777aadfdsaae22c1e867e01111dds1
openai-processing-ms: 67
access-control-allow-origin: *
strict-transport-security: max-age=15724800; includeSubDomains
cf-cache-status: DYNAMIC
server: cloudflare
cf-ray: 2713tfh12316a-AKL
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

An unsuccessful one will return nothing or will return an error.
If this is your case, you need to contact the server's system administrator to remove this restriction.
Version
2.1.1
Published
Updated
Downloads
3,863
Views
13,261
Compatible XF versions
  1. 2.0
  2. 2.1
  3. 2.2
  4. 2.3

Author

021