mirror of
https://github.com/aljazceru/gpt-engineer.git
synced 2025-12-17 20:55:09 +01:00
Make steps configurable
This commit is contained in:
@@ -21,6 +21,7 @@ def chat(
|
||||
),
|
||||
model: str = "gpt-4",
|
||||
temperature: float = 0.1,
|
||||
steps_config: str = "default",
|
||||
):
|
||||
app_dir = pathlib.Path(os.path.curdir)
|
||||
input_path = project_path
|
||||
@@ -40,7 +41,7 @@ def chat(
|
||||
identity=DB(app_dir / "identity"),
|
||||
)
|
||||
|
||||
for step in STEPS:
|
||||
for step in STEPS[steps_config]:
|
||||
messages = step(ai, dbs)
|
||||
dbs.logs[step.__name__] = json.dumps(messages)
|
||||
|
||||
|
||||
@@ -62,7 +62,11 @@ def run_clarified(ai: AI, dbs: DBs):
|
||||
return messages
|
||||
|
||||
|
||||
STEPS = [clarify, run_clarified]
|
||||
# Different configs of what steps to run
|
||||
STEPS = {
|
||||
'default': [run],
|
||||
'clarify': [clarify, run_clarified],
|
||||
}
|
||||
|
||||
# Future steps that can be added:
|
||||
# improve_files,
|
||||
|
||||
Reference in New Issue
Block a user