createChatCompletion seems to ignore the abort signal
Problem
Describe the bug Sending an 'abort' signal to the `createChatCompletion` does not raise an error nor stop the completion. It makes me believe that this discussion on the openai community is true https://community.openai.com/t/cancelling-openai-apis-request/99754, but I would like to verify it isn't a bug in this library. To Reproduce Here's my code [code block] Expectation: I should see output like this, and then an error should be raised: [code block] Actual: I see output like this that never stops: [code block] Code snippets _No response_ OS macOS Node version v19.8.1 Library version openai v3.2.1
Error Output
error nor stop the completion.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: createChatCompletion seems to ignore the abort signal
I have tried both `cancelToken` and `signal: abortController` neither stop the completion. Especially frustrating when the bot goes into a loop repeating the same line. By the way, I tried using frequency and presence penalty, but I think those penalty scores cause the bot to compensate with incorrect substitute tokens in things like long JSON responses.
Trust Score
1 verification
- 1
I have tried both `cancelToken` and `signal: abortController` neither stop the c
Especially frustrating when the bot goes into a loop repeating the same line.
- 2
By the way, I tried using frequency and presence penalty, but I think those pena
By the way, I tried using frequency and presence penalty, but I think those penalty scores cause the bot to compensate with incorrect substitute tokens in things like long JSON responses.
Validation
Resolved in openai/openai-node GitHub issue #134. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep