Replies: 1 comment
-
I found a way to handle it and found out, that OpenAi is creating the output in the same way. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I wrote my own chat frontend and switched yesterday to stream: true to get a faster response.
But it was hard to handle the data stream, because it's not sending valid JSON.
I receive things like: data: { ....JSON...} data: { ... JSON }
And at the end: data: [DONE]
Sometimes the output ends with an unclosed JSON Part. In the frontend I have to write a lot of RegEx and exception handling to get a clean output.
For my frontend I use nodeJS + express.
Example Video:
https://share.vidyard.com/watch/p8mWyKyHFnWXQ5Nynit9D4?
It would make me happy to collect your experiences about that.
Best
Frank
Beta Was this translation helpful? Give feedback.
All reactions