Open lucgagan opened 1 year ago
I've been getting the same error:
could not parse chunk:
"""
data: {"id":"chatcmpl-7fxAnT0JILLZxrdQwoMrTUilawTQV","object":"chat.completion.chunk","created":1690233265,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":" upon
"""
read value:
"""
data: {"id":"chatcmpl-7fxAnT0JILLZxrdQwoMrTUilawTQV","object":"chat.completion.chunk","created":1690233265,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}
data: {"id":"chatcmpl-7fxAnT0JILLZxrdQwoMrTUilawTQV","object":"chat.completion.chunk","created":1690233265,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"Once"},"finish_reason":null}]}
data: {"id":"chatcmpl-7fxAnT0JILLZxrdQwoMrTUilawTQV","object":"chat.completion.chunk","created":1690233265,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":" upon
"""
SyntaxError: Unterminated string in JSON at position 177
at JSON.parse (<anonymous>)
at consumeStream (/home/ubuntu/api/node_modules/completions/dist/createCompletions.js:133:67)
Could the metaprompt be responsible? Allowing users to modify or change it would be great. I'm not sure if the owner is still maintaining this repo, though... Any future plans on working on it?
I had been using this library, but have since moved over to the official openai sdk as it now supports streaming and functions very well. I had not really planned on doing any more work, especially because the prs that I have that address some issues are still sitting open without response.
I had been using this library, but have since moved over to the official openai sdk as it now supports streaming and functions very well. I had not really planned on doing any more work, especially because the prs that I have that address some issues are still sitting open without response.
To be fair, those PRs are open b/c they have conflicts in them.
It appears like a glitch by OpenAI, but seeing an increased number of truncated responses.
Example: