Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Decoding Response Body #11

Closed
bs10x opened this issue Apr 18, 2024 · 2 comments
Closed

Error Decoding Response Body #11

bs10x opened this issue Apr 18, 2024 · 2 comments

Comments

@bs10x
Copy link
Contributor

bs10x commented Apr 18, 2024

chatgpt-free-api service running on a proxy in the USA

curl http://127.0.0.1:3040/v1/chat/completions   -i -X POST   -H "Content-Type: application/json"   -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "stream": false
  }'

returns:

HTTP/1.1 200 OK
content-type: application/json
access-control-allow-origin: *
access-control-allow-methods: GET,POST,PUT,PATCH,DELETE
access-control-allow-headers: Content-Type,Authorization
content-length: 98
date: Thu, 18 Apr 2024 09:05:57 GMT

{"status":false,"error":{"message":"error decoding response body","type":"invalid_request_error"}}

log of the service:

Access the API server at: http://0.0.0.0:3040/v1/chat/completions

Environment Variables:
  - PORT: change the listening port, defaulting to 3040
  - ALL_PROXY: configure the proxy server, supporting HTTP, HTTPS, and SOCKS5 protocols
  - AUTHORIZATION: only for internal use to protect the API and will not be sent to OpenAI

Please contact us at https://github.com/xsigoking/chatgpt-free-api if you encounter any issues.

[2024-04-17T10:56:13Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T10:58:57Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:00:57Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:01:10Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:13:07Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:44:44Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:47:40Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:48:11Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:48:37Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:50:04Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:50:46Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:51:10Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:52:01Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T11:52:19Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T12:01:21Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-17T12:07:59Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T07:48:47Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T08:57:13Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T09:00:32Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T09:00:44Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T09:01:01Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T09:02:21Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T09:02:42Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T09:04:54Z ERROR] POST /v1/chat/completions 200 error decoding response body
[2024-04-18T09:05:57Z ERROR] POST /v1/chat/completions 200 error decoding response body
@bs10x bs10x changed the title Error Decoding Response Bpdy Error Decoding Response Body Apr 18, 2024
@xsigoking
Copy link
Owner

v0.3.0 has just been released, Please try it out and see if the problem persists.

If the problem persists, please try the following command:

curl 'https://chat.openai.com/backend-anon/sentinel/chat-requirements' \
  -H 'accept: */*' \
  -H 'accept-language: en' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'oai-device-id: 31d07b2e-40ae-4af8-9501-573ed853e39b' \
  -H 'oai-language: en-US' \
  -H 'origin: https://chat.openai.com' \
  -H 'pragma: no-cache' \
  -H 'referer: https://chat.openai.com/' \
  -H 'sec-ch-ua: "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36' \
  --data-raw '{}'

@xsigoking
Copy link
Owner

This issue is closed due to lack of user feedback. If the problem persists, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants