openai / openai-quickstart-node

Node.js example app from the OpenAI API quickstart tutorial
https://platform.openai.com/docs/quickstart?context=node
MIT License
2.55k stars 1.99k forks source link

Returns status code 500 #61

Closed gpadvorac closed 1 year ago

gpadvorac commented 1 year ago

Describe the bug

Using the node.js sample exaclty as-is with a good key, this line executes due to a status code 500:

message: "OpenAI API key not configured, please follow instructions in README.md",

I just created a new key and added it to the .env file like this:

OPENAI_API_KEY=k-5ybezAX9xxxxx_mykey

To Reproduce

See above

OS

Windows 11

Node version

Node v16.16.0

gpadvorac commented 1 year ago

Dumb user error: I did not copy the complete key