mishushakov / llm-scraper

Turn any webpage into structured data using LLMs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

where to add the OPENAI_API_KEY?

alipschutzsecuritize opened this issue · comments

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..

Set it in your environment variable :)