mirror of
https://github.com/aljazceru/gpt-engineer.git
synced 2025-12-17 12:45:26 +01:00
fix_code fix
This commit is contained in:
@@ -194,12 +194,12 @@ def use_feedback(ai: AI, dbs: DBs):
|
||||
|
||||
|
||||
def fix_code(ai: AI, dbs: DBs):
|
||||
codemem = json.loads(dbs.logs[gen_code.__name__])[-1]["content"]
|
||||
code_ouput = json.loads(dbs.logs[gen_code.__name__])[-1]["content"]
|
||||
messages = [
|
||||
ai.fsystem(setup_sys_prompt(dbs)),
|
||||
ai.fuser(f"Instructions: {dbs.input['main_prompt']}"),
|
||||
ai.fuser(codemem),
|
||||
ai.fsystem(dbs.identity["fixer"]),
|
||||
ai.fuser(code_ouput),
|
||||
ai.fsystem(dbs.identity["fix_code"]),
|
||||
]
|
||||
messages = ai.next(messages, "Please fix any errors in the code above.")
|
||||
to_files(messages[-1]["content"], dbs.workspace)
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
You are a super smart developer. You have been tasked with fixing a program and making it work according to the best of your knowledge. There might be placeholders in the code you have to fill in.
|
||||
You provide fully functioning, well formatted code with few comments, that works and has no bugs or placeholders.
|
||||
You provide fully functioning, well formatted code with few comments, that works and has no bugs.
|
||||
Please return the full new code in the same format.
|
||||
Reference in New Issue
Block a user