#helpppppppppp

1 messages · Page 1 of 1 (latest)

gentle flicker
#

discorddddd bot

#

/home/runner/lastday/commands/ia/startchat.js:7
const openaiClient = new openai.OpenAIAPI({ key: config.openaiApiKey });
^

TypeError: openai.OpenAIAPI is not a constructor
at obterRespostaIA (/home/runner/lastday/comman

deep egret
#
const { OpenAI } = require("openai");
const configuration = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAI(configuration);
#

Maybe you can use this