Get response without stream?

Hi, is there any way to get the response without the stream? Im making an app with NextJs and the openai sdk only returns a stream, I only want to get the response string… Is it possible?

Sure. Unless you provide stream=true, the response is not streamed.

The other way is to call the api directly, ie. using “fetch”.