You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm just using the example code in README, and I keep getting this error, I added the key and I'm 100% sure about it, seems the database is not created/saved and I don't know what to do
let bot = new ChatGPT(openAIAPIKeys, options);
let conversationId = "conversation name";
let response1 = await bot.ask("What is my first name?", conversationId);
console.log(response1);
/node_modules/chatgpt-official/dist/classes/chatgpt.js:64
throw new Error("No keys available.");
^
Error: No keys available.
at ChatGPT.getOpenAIKey (/node_modules/chatgpt-official/src/classes/chatgpt.ts:65:4)
at ChatGPT.askStream (/node_modules/chatgpt-official/src/classes/chatgpt.ts:150:19)
at ChatGPT.ask (/node_modules/chatgpt-official/src/classes/chatgpt.ts:146:3)
at example (/test.ts:53:31)
at /test.ts:87:5
at /test.ts:88:1
at ViteNodeRunner.directRequest (file:///node_modules/vite-node/dist/client.mjs:328:5)
at ViteNodeRunner.cachedRequest (file:///node_modules/vite-node/dist/client.mjs:186:14)
at ViteNodeRunner.executeFile (file:///node_modules/vite-node/dist/client.mjs:154:12)
at CAC.run (file:///node_modules/vite-node/dist/cli.mjs:70:5)
Node.js v19.8.1
The text was updated successfully, but these errors were encountered:
Hello
I'm just using the example code in README, and I keep getting this error, I added the key and I'm 100% sure about it, seems the database is not created/saved and I don't know what to do
The text was updated successfully, but these errors were encountered: