Skip to content

Commit 80f9477

Browse files
authored
Merge pull request #899 from ATheorell/main
Fixes to main path problem
2 parents 3996fbb + 4816f65 commit 80f9477

File tree

2 files changed

+3
-37
lines changed

2 files changed

+3
-37
lines changed

gpt_engineer/applications/cli/main.py

+2-36
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@
2828
import logging
2929
import os
3030

31-
from importlib.util import find_spec
3231
from pathlib import Path
3332

3433
import openai
35-
import toml
3634
import typer
3735

3836
from dotenv import load_dotenv
@@ -49,16 +47,6 @@
4947
from gpt_engineer.core.preprompts_holder import PrepromptsHolder
5048
from 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-
6250
app = 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)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "gpt-engineer"
3-
version = "0.2.2"
3+
version = "0.2.3"
44
description = "Specify what you want it to build, the AI asks for clarification, and then builds it."
55
authors = ["Anton Osika <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)