marcusschiesser / unc

Enterprise-ready, privacy-first ChatGPT platform
https://unc.de
GNU Affero General Public License v3.0
7 stars 1 forks source link

[Bug] JSON errors returned while chatting #4

Open marcusschiesser opened 11 months ago

marcusschiesser commented 11 months ago

Describe the bug While chatting, the user gets JSON parse error messages from the AI like:

{
  "error": true,
  "message": "JSON.parse: unexpected end of data at line 1 column 1 of the JSON data"
}

or

{
  "error": true,
  "message": "JSON.parse: unexpected end of data at line 1 column 1 of the JSON data"
}

In the current production, the console log shows the following error:

[Request] failed to make a chat request SyntaxError: Unexpected end of JSON input
    at s.chat (4682-b78a07a9c7dfe114.js:1:2349)
    at async d (2752.0c43510d3176525d.js:1:4135)
    at async p (2752.0c43510d3176525d.js:1:3934)

To Reproduce We don't have a clear test case, I guess it depends on the data the LLM returns. A user reported it while using the telegram bot feature, but my hunch is this is unrelated.

Expected behavior Don't show an error.

marcusschiesser commented 11 months ago

@LaDoger said the bug happens with a long replies in Telegram but I cannot reproduce it. Tested with: image

LaDoger commented 11 months ago

This bug occurs from time to time. I don't know how to reproduce it yet. We will keep trying.