Skip to content

Commit

Permalink
Merge pull request #870 from ATheorell/refactor
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
ATheorell authored Nov 26, 2023
2 parents 54b6dd9 + b665604 commit ab5e3e3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions gpt_engineer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gpt_engineer/applications/cli/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 []
4 changes: 2 additions & 2 deletions gpt_engineer/applications/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions gpt_engineer/core/default/lean_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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

0 comments on commit ab5e3e3

Please sign in to comment.