where to add the OPENAI_API_KEY?
alipschutzsecuritize opened this issue · comments
alipschutzsecuritize commented
This should be a stupid question.
But I downloaded the code, added a .env file, and added the OPENAI_API_KEY key:
OPENAI_API_KEY=sk-proj-ul8LSbIjofEoQGSDxWQpMz.....
then node examples/blablabla.js
Then I get:
node:internal/modules/run_main:129
triggerUncaughtException(
^
LoadAPIKeyError [AI_LoadAPIKeyError]: OpenAI API key is missing. Pass it using the 'apiKey' parameter or the OPENAI_API_KEY environment variable.
What am I missing?
Many thanks..
Mish Ushakov commented
Set it in your environment variable :)