Skip to content

Commit

Permalink
Python 3.8 support + Cleaning up some issues in extracting files out …
Browse files Browse the repository at this point in the history
…of the prompts (#355)

* Changed typing to fit python 3.8

* Made sure GPT won't add in comments about the files as these confuse the chat-to-files regex
  • Loading branch information
Nitaym authored Jul 2, 2023
1 parent 088fa3b commit 24fef65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gpt_engineer/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import logging

from typing import Dict, List

import openai

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -29,7 +31,7 @@ def fuser(self, msg):
def fassistant(self, msg):
return {"role": "assistant", "content": msg}

def next(self, messages: list[dict[str, str]], prompt=None):
def next(self, messages: List[Dict[str, str]], prompt=None):
if prompt:
messages += [{"role": "user", "content": prompt}]

Expand Down
2 changes: 2 additions & 0 deletions gpt_engineer/preprompts/generate
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ FILENAME
CODE
```

Do not comment on what every file does

You will start with the "entrypoint" file, then go to the ones that are imported by that file, and so on.
Please note that the code should be fully functional. No placeholders.

Expand Down

0 comments on commit 24fef65

Please sign in to comment.