openai-node icon indicating copy to clipboard operation
openai-node copied to clipboard

"lib/IsolatedGPT35TurboMutation/deleteFineTuneModel: AbortController is not defined"

Open pavelbrui opened this issue 2 years ago • 7 comments

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

What is this error? It works fine locally, but when deploying I get this error..: "lib/IsolatedGPT35TurboMutation/deleteFineTuneModel: AbortController is not defined"

To Reproduce

if (job.model_id) { if (!src.openAiKey) throw new Error('OpenAiKey not found'); const openai = new OpenAI({ apiKey: src.openAiKey }); const model = await openai.models.del(job.model_id);

Code snippets

No response

OS

macOS

Node version

Node 18

Library version

openai 4.0.8

pavelbrui avatar Sep 22 '23 07:09 pavelbrui

Thank you for reporting this. Where are you deploying to, and what are your deployment settings?

Can you share a full traceback?

rattrayalex avatar Sep 22 '23 15:09 rattrayalex

Can you check whether this happens on "openai": "4.8.0" and "openai": "4.9.0"? We changed behavior in 4.9.0, so it'd be helpful to know whether that version fixed the issue, regressed it, or didn't fix it.

rattrayalex avatar Sep 22 '23 15:09 rattrayalex

Hi, I also cannot install any openai npmjs module over 3.3.0 thus am unable to call the correct api url for gpt-4 - receiving error on install ReferenceError: AbortController is not defined Node: 16.16.0 macOS

frankwo1 avatar Sep 25 '23 00:09 frankwo1

unable to resolve the ReferenceError: AbortController is not defined error when trying to install openai>3.3.0 npm package. updated my node to 18.18.0 MacOS

frankwo1 avatar Sep 25 '23 00:09 frankwo1

Can you please share what package version you are using, how you are running the code, and a traceback?

rattrayalex avatar Sep 25 '23 02:09 rattrayalex

Running node 18.18 works with openai 3.3.0 - unable to run gpt-4 with this package version (but am able davince) and cannot upgrade to openai 4 since it has this error during install (ReferenceError: AbortController is not defined)

W20230925-07:03:25.046(-4)? (STDERR) ReferenceError: AbortController is not defined W20230925-07:03:25.047(-4)? (STDERR) at Object.getRuntime (.npm/package/node_modules/openai/_shims/node-runtime.js:69:25) W20230925-07:03:25.047(-4)? (STDERR) at Object. (.npm/package/node_modules/openai/_shims/index.js:6:38) W20230925-07:03:25.047(-4)? (STDERR) at Module._compile (internal/modules/cjs/loader.js:1085:14) W20230925-07:03:25.047(-4)? (STDERR) at Module.Mp._compile (.meteor/local/build/programs/server/runtime.js:99:23) W20230925-07:03:25.047(-4)? (STDERR) at Object.Module._extensions..js (.meteor/local/build/programs/server/runtime.js:131:23) W20230925-07:03:25.047(-4)? (STDERR) at Module.load (internal/modules/cjs/loader.js:950:32) W20230925-07:03:25.047(-4)? (STDERR) at Module.Mp.load (.meteor/local/build/programs/server/runtime.js:46:33) W20230925-07:03:25.047(-4)? (STDERR) at Function.Module._load (internal/modules/cjs/loader.js:790:12) W20230925-07:03:25.047(-4)? (STDERR) at Module.require (internal/modules/cjs/loader.js:974:19) W20230925-07:03:25.047(-4)? (STDERR) at require (internal/modules/cjs/helpers.js:101:18) W20230925-07:03:25.047(-4)? (STDERR) at Object. (.npm/package/node_modules/openai/core.js:19:17) W20230925-07:03:25.048(-4)? (STDERR) at Module._compile (internal/modules/cjs/loader.js:1085:14) W20230925-07:03:25.048(-4)? (STDERR) at Module.Mp._compile (.meteor/local/build/programs/server/runtime.js:99:23) W20230925-07:03:25.048(-4)? (STDERR) at Object.Module._extensions..js (.meteor/local/build/programs/server/runtime.js:131:23) W20230925-07:03:25.048(-4)? (STDERR) at Module.load (internal/modules/cjs/loader.js:950:32) W20230925-07:03:25.048(-4)? (STDERR) at Module.Mp.load (.meteor/local/build/programs/server/runtime.js:46:33)

frankwo1 avatar Sep 25 '23 10:09 frankwo1

@frankwo1 how are you installing and building your code?

rattrayalex avatar Sep 27 '23 00:09 rattrayalex