Closed d4rkc0de closed 1 year ago
I had the same experience. Needed to use gtp-3.5-turbo, and ran the example. Used snake description genterated by chat.openai.com, and it talked about file1 board.py
with code, and so on, but the only files in the workspace was one called python (no extension) that appears to contain the code for the controller class.
Same issue. The application ends after "Now let's proceed with the file contents.".
Behaviour is different between gpt-3.5-turbo
and gpt-3.5-turbo-16k
The former doesn't work very well (no files are created, except the all_output.txt
and the latter indeed just keeps ending like you mention on #32 @WizKid1968
Behaviour is different between
gpt-3.5-turbo
andgpt-3.5-turbo-16k
The former doesn't work very well (no files are created, except the
all_output.txt
and the latter indeed just keeps ending like you mention on #32 @WizKid1968
You're absolutely right, I'm using gpt-3.5-turbo-16k.
Heres my solution: create a python file for instance 'create_files.py' then add the following code:
import re
import os
save_dir = "results/"
f = open("example/workspace/all_output.txt", "r")
s = f.read()
#pattern = re.compile(r'^\*\*(.*?\.py)\*\*\s+```python\s+.*?(^(?:.*\n)*?)^```\s*', re.MULTILINE) #Example **game.py**
#pattern = re.compile(r'^(.*?\.py):\s+```python\s+.*?(^(?:.*\n)*?)^```\s*', re.MULTILINE) #Example game.py:
pattern = re.compile(r'^.*?\((.*?\.py)\):\s+```python\s+.*?(^(?:.*\n)*?)^```\s*', re.MULTILINE) #Example Game File (game.py):
os.makedirs(save_dir, exist_ok=True)
for (file_name, file_text) in re.findall(pattern, s):
write_file = open(save_dir + file_name, "w")
write_file.write(file_text)
write_file.close()
print(file_name, "\n")
but sometimes you have to change the regex because the output isn't always the same.
so if you see **game.py** use:
#pattern = re.compile(r'^\*\*(.*?\.py)\*\*\s+```python\s+.*?(^(?:.*\n)*?)^```\s*', re.MULTILINE) #Example **game.py**
if you see game.py\: then use this:
pattern = re.compile(r'^(.*?\.py):\s+```python\s+.*?(^(?:.*\n)*?)^```\s', re.MULTILINE)
if you see 'Game file (game.py)' use:
pattern = re.compile(r'^.*?\((.*?\.py)\):\s+```python\s+.*?(^(?:.*\n)*?)^```\s*', re.MULTILINE) #Example Game File (game.py):
where do we put this?
where do we put this?
I created a file called 'create_files.py' in the main repo directory. then ran python create_files.py
Can that solution be made more generic, so c++, py etc all work. I think the line above the marker actually gives the proper filename (using 3.5-turbo)
@iplayfast Here yea go https://github.com/AntonOsika/gpt-engineer/issues/35#issuecomment-1594148378
@DrMemoryFish check this comment out https://github.com/AntonOsika/gpt-engineer/issues/35#issuecomment-1594148378
Hi, did you also change the (hardcoded) GPT-4 reference in file https://github.com/AntonOsika/gpt-engineer/blob/12cb93fc7a6ea3d1865b6dd8a2f892c4105bebaf/scripts/rerun_edited_message_logs.py? I'm using the gpt-3.5-turbo-16k and files are (now) created for me.
I did on my copy, but they are already working on having the project default to gpt-3.5-turbo if gpt-4 is not available. This did create the files for me too.
O geez sorry to spam you @RemkoDelsman I didn't realize you are the one in that comment lol... Just woke up so catching up with all the new issues and comments etc.
Adjusting the identities was a small (2 line) change that seems to work for me - see here
A lot of progress has been done on this since the last comment here, make sure to pull the latest version.
If you wish to reopen the issue please do following the new issue template.
I closed the issue because the problem don't exist in the latest version.
I'm using
gpt-3.5-turbo
becausegpt-4
doesn't workI asked for an angular project with a table that is generated from an API, however it generated all output in afile called all_output.txt, and file called HTML and a file called typescript,
What is expected to generate all files separately (app.component.ts, api.service.ts, table.component.ts app.component.html ...) with their corresponding content instead of generating it in the all_output.txt
all_output.txt