How to stop streaming
Problem
Confirm this is a Node library issue and not an underlying OpenAI API issue - [X] This is an issue with the Node library Describe the bug I use stream.abort(); to stop receive from api , but i have exception below [code block] I have been follow to guide in the document > If you need to cancel a stream, you can break from a for await loop or call `stream.abort()`. To Reproduce [code block] Nope Code snippets _No response_ OS Ubuntu Node version 16.15.1 Library version v4.28.0
Error Output
Error: Request was aborted.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: How to stop streaming
This is working as intended – you need to add a `.catch` here: [code block]
Trust Score
1 verification
- 1
This is working as intended – you need to add a `.catch` here:
This is working as intended – you need to add a `.catch` here:
Validation
Resolved in openai/openai-node GitHub issue #682. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep