#Issues with openai-edge and Readable Stream

1 messages · Page 1 of 1 (latest)

eternal lotus
#

Hi everyone. Im trying to get this code to work but I cant figure out why im getting this error in the picture

My code is also attached

Basically I need to read completion multiple times and its saying I cant and that the readable stream is locked. Is what Im trying to do impossible?

EDIT: Also, when I enable streaming, it doesnt return a normal JSON file. It returns a bunch of lines that start with data. Is there a way to combine it all into one JSON so I can have streaming and function calling enabled at the same time?