betalgo / openai

OpenAI .NET sdk - Azure OpenAI, ChatGPT, Whisper, and DALL-E
https://betalgo.github.io/openai/
MIT License
2.84k stars 513 forks source link

[Question] How to interrupt the streaming output? #566

Closed MayDay-wpf closed 1 month ago

MayDay-wpf commented 1 month ago

Here is a part of my code image Currently, I am using Redis to save a variable in order to interrupt the output operation. However, in reality, the request is not interrupted. Is there any way to stop the streaming output? If so, could you please guide me on how to use it? Thank you very much.