-
Notifications
You must be signed in to change notification settings - Fork 492
Open
Description
When trying to run the query_data.py script, I kept getting the following errors:
Did not find openai_api_key, please add an environment variable
OPENAI_API_KEYwhich contains it, or passopenai_api_keyas a named parameter. (type=value_error)
After consulting claude, I added these lines (copied from the create_database.py) into the query script.
from dotenv import load_dotenv
import osLoad environment variables. Assumes that project contains .env file with API keys
load_dotenv()
Adding this worked and I am able to query the database. Not really a developer, so I am not sure if this is the best way to fix this.
Metadata
Metadata
Assignees
Labels
No labels