From 3e91b51e734edacb7a88f4c417a96f34ab552720 Mon Sep 17 00:00:00 2001 From: Axel Theorell Date: Sun, 26 Nov 2023 11:37:46 +0100 Subject: [PATCH 1/2] Fixed bug in LeanAgent --- gpt_engineer/core/default/lean_agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpt_engineer/core/default/lean_agent.py b/gpt_engineer/core/default/lean_agent.py index e0d8965092..8dbedd7121 100644 --- a/gpt_engineer/core/default/lean_agent.py +++ b/gpt_engineer/core/default/lean_agent.py @@ -56,7 +56,7 @@ def init(self, prompt: str) -> Code: code = gen_code(self.ai, prompt, self.memory, self.preprompts_holder) entrypoint = gen_entrypoint(self.ai, code, self.memory, self.preprompts_holder) code = Code(code | entrypoint) - code = self.execution_env.execute_program(code) + self.execution_env.execute_program(code) return code def improve( @@ -68,5 +68,5 @@ def improve( self.ai, code, self.memory, self.preprompts_holder ) code = Code(code | entrypoint) - code = self.execution_env.execute_program(code) + self.execution_env.execute_program(code) return code From b6656043da517dff2f940deb932a2944b77398e1 Mon Sep 17 00:00:00 2001 From: Axel Theorell Date: Sun, 26 Nov 2023 19:45:57 +0100 Subject: [PATCH 2/2] Umer feedback. --- gpt_engineer/__init__.py | 5 +++-- gpt_engineer/applications/cli/collect.py | 2 +- gpt_engineer/applications/cli/main.py | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gpt_engineer/__init__.py b/gpt_engineer/__init__.py index 3389df2c1a..ec3f8ccbab 100644 --- a/gpt_engineer/__init__.py +++ b/gpt_engineer/__init__.py @@ -3,5 +3,6 @@ ai, chat_to_files, ) -from gpt_engineer.tools import code_vector_repository -from gpt_engineer.core.default import on_disk_repository + +# from gpt_engineer.tools import code_vector_repository +# from gpt_engineer.core.default import on_disk_repository diff --git a/gpt_engineer/applications/cli/collect.py b/gpt_engineer/applications/cli/collect.py index c2e8f2b970..8309a18952 100644 --- a/gpt_engineer/applications/cli/collect.py +++ b/gpt_engineer/applications/cli/collect.py @@ -162,4 +162,4 @@ def collect_and_send_human_review( """Collects and stores human review of the code""" review = human_review_input() collect_learnings(prompt, model, temperature, config, memory, review) - return [] + # return [] diff --git a/gpt_engineer/applications/cli/main.py b/gpt_engineer/applications/cli/main.py index cbcd28de8a..a160f4dbb7 100644 --- a/gpt_engineer/applications/cli/main.py +++ b/gpt_engineer/applications/cli/main.py @@ -178,7 +178,7 @@ def main( else: execution_fn = execute_entrypoint - if --vector_improve_mode: + if vector_improve_mode: improve_fn = vector_improve else: improve_fn = improve @@ -198,7 +198,7 @@ def main( preprompts_holder=preprompts_holder, ) if improve_mode: - if --vector_improve_mode: + if vector_improve_mode: code = get_all_code(project_path) else: code = ask_for_files(project_path)