Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions main_no_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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