diff --git a/main_no_modal.py b/main_no_modal.py index b3edba516..55012149e 100644 --- a/main_no_modal.py +++ b/main_no_modal.py @@ -3,6 +3,7 @@ import ast from time import sleep from utils import clean_dir +from dotenv import load_dotenv from constants import DEFAULT_DIR, DEFAULT_MODEL, DEFAULT_MAX_TOKENS def generate_response(system_prompt, user_prompt, *args): @@ -104,6 +105,9 @@ def generate_file( def main(prompt, directory=DEFAULT_DIR, file=None): + # load .env file + load_dotenv() + # read file from prompt if it ends in a .md filetype if prompt.endswith(".md"): with open(prompt, "r") as promptfile: diff --git a/requirements.txt b/requirements.txt index fd9510f5d..bd6b50c61 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ # if you are running the default variants (main.py, debugger.py, etc), you do not need to install these requirements openai tiktoken +python-dotenv \ No newline at end of file