lucgagan / completions

Node.js SDK for interacting with OpenAI Chat API.
https://ray.run/
MIT License
45 stars 8 forks source link

How to cancel a stream from by external condition.? #8

Open Kypaku opened 1 year ago

Kypaku commented 1 year ago

For example, I just want to stop streaming with a click of a button or any other external condition. For now, it is possible only within the callback. I think the best solution will look like chat.stopStream()