2828import logging
2929import os
3030
31- from importlib .util import find_spec
3231from pathlib import Path
3332
3433import openai
35- import toml
3634import typer
3735
3836from dotenv import load_dotenv
4947from gpt_engineer .core .preprompts_holder import PrepromptsHolder
5048from gpt_engineer .tools .custom_steps import clarified_gen , lite_gen , self_heal
5149
52- # Load the names of the optional dependencies from the pyprojecct file and determine whether
53- # they can be imported
54- with open ("pyproject.toml" , "r" ) as file :
55- pyproject = toml .load (file )
56-
57- dependency_group = pyproject ["tool" ]["poetry" ]["group" ]["experimental" ]["dependencies" ]
58- optional_deps_importable = all (
59- [find_spec (dep_name .replace ("-" , "_" )) is not None for dep_name in dependency_group ]
60- )
61-
6250app = typer .Typer () # creates a CLI app
6351
6452
@@ -110,11 +98,6 @@ def main(
11098 "-i" ,
11199 help = "Improve files_dict from existing project." ,
112100 ),
113- improve_all_mode : bool = typer .Option (
114- False ,
115- "--improve-all-experimental" ,
116- help = "Improve files_dict from existing project, without manually choosing which files to improve, using vector store (EXPERIMENTAL)." ,
117- ),
118101 lite_mode : bool = typer .Option (
119102 False ,
120103 "--lite" ,
@@ -156,9 +139,6 @@ def main(
156139 """
157140 logging .basicConfig (level = logging .DEBUG if verbose else logging .INFO )
158141 #
159- if improve_all_mode and not improve_mode :
160- print ("Vector improve mode implies improve mode, setting improve_mode=True" )
161- improve_mode = True
162142
163143 if improve_mode :
164144 assert not (
@@ -192,18 +172,7 @@ def main(
192172 else :
193173 execution_fn = execute_entrypoint
194174
195- if improve_all_mode and optional_deps_importable :
196- from gpt_engineer .tools .experimental .experimental_steps import (
197- improve_automatic_file_selection ,
198- )
199-
200- improve_fn = improve_automatic_file_selection
201- elif improve_all_mode :
202- raise ImportError (
203- "The experimental improve_all_mode is selected, but the optional dependencies to use it are not installed. Please run 'poetry install --with experimental'"
204- )
205- else :
206- improve_fn = improve
175+ improve_fn = improve
207176
208177 preprompts_path = get_preprompts_path (use_custom_preprompts , Path (project_path ))
209178 preprompts_holder = PrepromptsHolder (preprompts_path )
@@ -221,10 +190,7 @@ def main(
221190
222191 store = FileStore (project_path )
223192 if improve_mode :
224- if improve_all_mode :
225- files_dict = store .download ()
226- else :
227- files_dict = ask_for_files (project_path )
193+ files_dict = ask_for_files (project_path )
228194 files_dict = agent .improve (files_dict , prompt )
229195 else :
230196 files_dict = agent .init (prompt )
0 commit comments