Add --verbose option for logging request/response

This commit is contained in:
Carl Thomé
2023-06-18 16:21:16 +02:00
parent 16a3278ee3
commit 38401b2f35
2 changed files with 12 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import json
import logging
import os
import pathlib
import shutil
@@ -26,7 +27,10 @@ def chat(
model: str = "gpt-4",
temperature: float = 0.1,
steps_config: str = "default",
verbose: bool = typer.Option(False, "--verbose", "-v"),
):
logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO)
app_dir = pathlib.Path(os.path.curdir)
input_path = pathlib.Path(app_dir / "projects" / project_path)
memory_path = input_path / (run_prefix + "memory")