Streams openai responses
Attributes
Includes Deno configuration
Repository
Current version released
a year ago
Versions
openai response streamer
I just got tired of writing the same code again and again, so here it is.
This thing streams a response coming from the nodejs openai package.
Usage
const res = await openai.createChatCompletion({
// ...
})
await streamResponse(res, (data: string) => {
// do something with the data chunk
})