fix_code fix

This commit is contained in:
Emil Ahlbäck
2023-06-18 16:36:41 +02:00
parent 3f86b2a33d
commit 8b9b018307
2 changed files with 5 additions and 4 deletions

View File

@@ -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)

View File

@@ -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.