NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Bug] error:We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.

Open zip8919 opened this issue 1 year ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Deployment

  • [ ] Docker
  • [ ] Vercel
  • [ ] Server

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional Logs Add any logs about the problem here. { "error": { "message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)", "type": "invalid_request_error", "param": null, "code": null } }

zip8919 avatar Feb 18 '24 12:02 zip8919

@zip8919 could you share more details about how to reproduce this issue? e.g. prompts, message, etc

fred-bf avatar Feb 20 '24 10:02 fred-bf

{
  "error": {
    "message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

Running on Vercel

jamesKhor avatar Feb 27 '24 02:02 jamesKhor

@jamesKhor I mean how did you trigger this issue(e.g. prompts), and did it exists on every messages you sent or specify message?

fred-bf avatar Feb 27 '24 02:02 fred-bf

it was every request/prompt. I just found the root cause. i was running an old version 20230601.

jamesKhor avatar Feb 27 '24 02:02 jamesKhor

it was every request/prompt. I just found the root cause. i was running an old version 20230601.

I have the same problem.

kevinxxq avatar Feb 27 '24 14:02 kevinxxq