#Invalid Request Error (node.js)

6 messages · Page 1 of 1 (latest)

supple wren
#

Hello, I'm getting a invalid request error about not having an API key, even though this same .env apikey works when I use the gpt-3 version of the code. I wanted to switch to gpt-3.5turbo and after reworking the code it just doesn't seem to work. Can't attach code here due to size limits, here's a pastebin: https://pastebin.com/GXZ6UCMW

supple wren
#

I got rid of the quotes around let prompt = fs.readFileSync('prompt.txt', 'utf-8');

#

also changed createCompletion to openai.createChatCompletion(data);

#

since I think 3.5 turbo needs you to make that api call instead

#

Im getting null as the response now, not sure if thats better or worse

supple wren