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

Improve handling of streamed data in chat #64

Merged
merged 1 commit into from
Jun 30, 2024

Conversation

StreetLamb
Copy link
Owner

  • Use TextDecoder with stream: true to properly decode multi-byte characters and JSON fragments
  • Retain partial lines in the buffer for correct processing across chunks
  • Ensure complete lines starting with 'data: ' are parsed correctly

- Use TextDecoder with stream: true to properly decode multi-byte characters and JSON fragments
- Retain partial lines in the buffer for correct processing across chunks
- Ensure complete lines starting with 'data: ' are parsed correctly
@StreetLamb StreetLamb added the bug Something isn't working label Jun 30, 2024
@StreetLamb StreetLamb merged commit 764ac71 into master Jun 30, 2024
4 checks passed
@StreetLamb StreetLamb deleted the fix/stream-parsing-issue branch June 30, 2024 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant