why do I get readable stream error when using vercel ai
Unanswered
European pilchard posted this in #help-forum
European pilchardOP
I’m trying to use vercel AI sdk, and whenever I access completion more than once I get
error Error [TypeError]:
ReadableStream. prototype.pipeThrough cannot be used on a locked ReadableStream
Is there no way I can access the data more than once in my code? Also, I believe it outputs the streamed info in SSE format. How can I convert that to a regular JSON?
Thanks in advance!
error Error [TypeError]:
ReadableStream. prototype.pipeThrough cannot be used on a locked ReadableStream
Is there no way I can access the data more than once in my code? Also, I believe it outputs the streamed info in SSE format. How can I convert that to a regular JSON?
Thanks in advance!