-
Notifications
You must be signed in to change notification settings - Fork 270
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
sometimes Unexpected non-whitespace character ruines all the fun #29
Comments
I ran into this a little while back. This has to do with how the response, which can contain multiple completions in JSONL format (multiple JSON objects separated by new lines) is parsed. JSON.parse will fail on the JSONL format. You can modify the |
@GChristen would you like doing a PR for this? |
I am also getting this. I have a server based on the ollama APII spec. In non-streaming mode everything is OK, but in streaming mode I am also getting this error. I have tried with and without a NL between the response chunks. Is there a convenient place in chat-bot ollama where I could print the offending line?
My server log shows this being generated:
|
SyntaxError: Unexpected non-whitespace character after JSON at position 104 (line 2 column 1)
at JSON.parse ()
at Object.start (webpack-internal:///(middleware)/./utils/server/index.ts:46:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
this error I think is similar to one GPT API has too...
The text was updated successfully, but these errors were encountered: