with reference to this.
I’m pretty new to all this and hoping someone can help…
GPT tried but to no avail
This is my text in the openai node.
const { Configuration, OpenAIApi } = openai;
const configuration = new Configuration ({ apiKey: “sk-kfgjskdhn48kgfkjsngi” });
const openaiApi = new OpenAIApi(configuration);
openaiApi.createCompletion({
model: “text-davinci-003”,
prompt: msg.prompt,
temperature: 0.7,
max_tokens: 1200,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
}).then(answer => {
msg.answer = answer
node.send(msg);
node.done();
});
return
i keep getting the error, “TypeError: Configuration is not a constructor” any ideas? i am using Node-red in Home assistant Supervisor. Thanks