Make steps configurable

This commit is contained in:
Anton Osika
2023-06-17 13:02:16 +02:00
parent ee0737b6e3
commit 03d8fff5d2
10 changed files with 27 additions and 8 deletions

View File

@@ -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)