From 8b9b01830704d422743a7731a22f15128713c57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Ahlb=C3=A4ck?= Date: Sun, 18 Jun 2023 16:36:41 +0200 Subject: [PATCH] fix_code fix --- gpt_engineer/steps.py | 6 +++--- identity/fix_code | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gpt_engineer/steps.py b/gpt_engineer/steps.py index fa7de4f..32bad04 100644 --- a/gpt_engineer/steps.py +++ b/gpt_engineer/steps.py @@ -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) diff --git a/identity/fix_code b/identity/fix_code index 667905c..b71f636 100644 --- a/identity/fix_code +++ b/identity/fix_code @@ -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. \ No newline at end of file +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. \ No newline at end of file