-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix(streaming): Data Truncation Issue in useHandleStream Function #2079
Conversation
Someone is attempting to deploy a commit to the Quivr-app Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot my friend !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot my friend !
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🤖 I have created a release *beep* *boop* --- ## 0.0.184 (2024-01-26) ## What's Changed * feat(panel): added by @Zewed in #2088 * feat: 🎸 api by @StanGirard in #2078 * fix(frontend): clear message input on submit by @Zewed in #2087 * fix: 🐛 related by @StanGirard in #2090 * feat: Added translation status badge from inlang by @NilsJacobsen in #2080 * fix(streaming): Data Truncation Issue in useHandleStream Function by @openperf in #2079 * feat: 🎸 sources by @StanGirard in #2092 * fix(frontend): clean related Brains useEffect by @Zewed in #2091 ## New Contributors * @openperf made their first contribution in #2079 **Full Changelog**: v0.0.183...v0.0.184 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Description
This PR introduces modifications to the useHandleStream function in the useHandleStream.ts file, aiming to resolve the issue of data truncation leading to incomplete display of Q&A on the front end. By optimizing data handling logic and enhancing error management, this change ensures the integrity of data streams and accurate display on the front end.
Changes Made
Introduced a variable incompleteData to store and process incomplete data fragments.
Implemented logic to concatenate incomplete data with new chunks and parse them once complete.
Added error handling to gracefully manage the parsing of incomplete data and data strings.
Improved the handling of the first data chunk, enhancing the coherence of data processing.
Motivation and Context
The primary motivation for these changes is to address the issue of incomplete front-end display, caused by data stream truncation under unstable network conditions. This optimization is intended to enhance the stability and reliability of the application when handling large volumes of real-time data streams, ensuring that the user interface correctly displays complete Q&A information.
Checklist before requesting a review
My code follows the style guidelines of this project.
I have performed a self-review of my own code.
I have commented in hard-to-understand areas of my code.
I have made corresponding changes to the documentation (if applicable).
I have added tests that prove my fix is effective or that my feature works (if applicable).
New and existing unit tests pass locally with my changes.
Any dependent changes have been merged and published in downstream modules (if applicable).
Screenshots (if appropriate)