Closed emilianomon closed 11 months ago
I did not know about this, but it seems like Postman bugs out if you request a high frequency stream multiple times without clearing the response's textarea
.
To work around it just clear the response and request again and the problem must be gone.
Btw: I do not remember this behaviour from Postman when using Node. If anyone has had this issue before, leave a comment.
I am having this issue, since I've migrated from Node to Bun, writing streams by hand or using this plugin.
The problem consists of streams accumulating chunks and displaying all at once OR chunks simply being lost.
Here is an example: PS: If I simply return the Stream object like it's said in the docs, Elysia returns a "jsonfied" version of
new Stream(...)
, so... I had to tweak it a little.The code above works with 250ms timeouts or higher, but won't with faster frequencies.
Since the project I am working leverages gen AI, this timeout won't deliver an acceptable UX.
Assuming the snippet is within a handler, what could be going wrong?