You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not quite sure how to use this library in Node. When I try to read data from the stream it says stream.on is not a function. Here is my example code:
import{OpenAI}from"openai-streams";conststream=OpenAI("chat",{model: "gpt-3.5-turbo",messages: [{role: "user",content: "my question ..."}]},{apiKey: ""});stream.on("data",(data)=>{console.log("DATA:",data);});stream.on("end",()=>{console.log("STREAM END");});
Am I on the wrong track?
The text was updated successfully, but these errors were encountered:
Hello,
I am not quite sure how to use this library in Node. When I try to read data from the stream it says
stream.on is not a function
. Here is my example code:Am I on the wrong track?
The text was updated successfully, but these errors were encountered: