From cda1991321ff49cb98a61b938abf4453858cc2cf Mon Sep 17 00:00:00 2001 From: Axel Theorell Date: Wed, 13 Dec 2023 14:46:44 +0100 Subject: [PATCH 1/2] path fix in main, removing experimental for now --- gpt_engineer/applications/cli/main.py | 38 ++------------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/gpt_engineer/applications/cli/main.py b/gpt_engineer/applications/cli/main.py index f0c10235bd..f03c90fb2d 100644 --- a/gpt_engineer/applications/cli/main.py +++ b/gpt_engineer/applications/cli/main.py @@ -28,11 +28,9 @@ import logging import os -from importlib.util import find_spec from pathlib import Path import openai -import toml import typer from dotenv import load_dotenv @@ -49,16 +47,6 @@ from gpt_engineer.core.preprompts_holder import PrepromptsHolder from gpt_engineer.tools.custom_steps import clarified_gen, lite_gen, self_heal -# Load the names of the optional dependencies from the pyprojecct file and determine whether -# they can be imported -with open("pyproject.toml", "r") as file: - pyproject = toml.load(file) - -dependency_group = pyproject["tool"]["poetry"]["group"]["experimental"]["dependencies"] -optional_deps_importable = all( - [find_spec(dep_name.replace("-", "_")) is not None for dep_name in dependency_group] -) - app = typer.Typer() # creates a CLI app @@ -110,11 +98,6 @@ def main( "-i", help="Improve files_dict from existing project.", ), - improve_all_mode: bool = typer.Option( - False, - "--improve-all-experimental", - help="Improve files_dict from existing project, without manually choosing which files to improve, using vector store (EXPERIMENTAL).", - ), lite_mode: bool = typer.Option( False, "--lite", @@ -156,9 +139,6 @@ def main( """ logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO) # - if improve_all_mode and not improve_mode: - print("Vector improve mode implies improve mode, setting improve_mode=True") - improve_mode = True if improve_mode: assert not ( @@ -192,18 +172,7 @@ def main( else: execution_fn = execute_entrypoint - if improve_all_mode and optional_deps_importable: - from gpt_engineer.tools.experimental.experimental_steps import ( - improve_automatic_file_selection, - ) - - improve_fn = improve_automatic_file_selection - elif improve_all_mode: - raise ImportError( - "The experimental improve_all_mode is selected, but the optional dependencies to use it are not installed. Please run 'poetry install --with experimental'" - ) - else: - improve_fn = improve + improve_fn = improve preprompts_path = get_preprompts_path(use_custom_preprompts, Path(project_path)) preprompts_holder = PrepromptsHolder(preprompts_path) @@ -221,10 +190,7 @@ def main( store = FileStore(project_path) if improve_mode: - if improve_all_mode: - files_dict = store.download() - else: - files_dict = ask_for_files(project_path) + files_dict = ask_for_files(project_path) files_dict = agent.improve(files_dict, prompt) else: files_dict = agent.init(prompt) From 4816f6533db1a1287b87860f090455c355dc2abf Mon Sep 17 00:00:00 2001 From: Axel Theorell Date: Wed, 13 Dec 2023 14:47:01 +0100 Subject: [PATCH 2/2] patch 0.2.3 for main path problem --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0046ceaf31..1df123c49a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gpt-engineer" -version = "0.2.2" +version = "0.2.3" description = "Specify what you want it to build, the AI asks for clarification, and then builds it." authors = ["Anton Osika "] license = "MIT"