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

"The given data was not valid JSON." Streaming Error #103

Closed
PallavAg opened this issue Oct 10, 2023 · 3 comments
Closed

"The given data was not valid JSON." Streaming Error #103

PallavAg opened this issue Oct 10, 2023 · 3 comments

Comments

@PallavAg
Copy link
Contributor

PallavAg commented Oct 10, 2023

Describe the bug
I'm on version 0.2.4, while streaming responses I still seem to often be getting the following error:
"The data couldn't be read because it isn't in the correct format."

In the console the full output is:
dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected end of file" UserInfo={NSDebugDescription=Unexpected end of file})))

To Reproduce
I usually always get this output when asking GPT-3.5: "Write 1 to 40 using bullet points"

Edit: Opened a PR to fix this: #104

@LordMatalas
Copy link

9 hours ago I had exactly the same situation, noticed that after 30 minutes of inactivity on my app; I was able to get communication with the API without that error message. Now, I'm not experimenting this issue anymore. No changes were made on the app though.

@PallavAg
Copy link
Contributor Author

PallavAg commented Oct 13, 2023

Opened a PR -> #104

@mariusiordache
Copy link

I have the same issue. It happens very often. When will the fix be released?

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

4 participants