mirror of
https://github.com/aljazceru/gpt-engineer.git
synced 2025-12-17 12:45:26 +01:00
Python 3.8 support + Cleaning up some issues in extracting files out 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
This commit is contained in:
@@ -2,6 +2,8 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from typing import Dict, List
|
||||||
|
|
||||||
import openai
|
import openai
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -29,7 +31,7 @@ class AI:
|
|||||||
def fassistant(self, msg):
|
def fassistant(self, msg):
|
||||||
return {"role": "assistant", "content": 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:
|
if prompt:
|
||||||
messages += [{"role": "user", "content": prompt}]
|
messages += [{"role": "user", "content": prompt}]
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ FILENAME
|
|||||||
CODE
|
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.
|
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.
|
Please note that the code should be fully functional. No placeholders.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user