diff --git a/README.md b/README.md index ee44ccb..4c18870 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ python -m logpilot.cli analyze [OPTIONS] - `--recursive` : Recurse into subdirectories (directory mode) - `--include ` : Glob pattern(s) to include (repeatable) - `--exclude ` : Glob pattern(s) to exclude (repeatable) +- `--model ` : LLM model to use (default: gpt-4) ### Example @@ -62,6 +63,12 @@ Summarize a log file and write to a file: python -m logpilot.cli analyze mylog.txt --out-file summary.txt ``` +Analyze logs with a different model: + +```sh +python -m logpilot.cli analyze mylog.txt --model gpt-3.5-turbo +``` + ## Project Structure - `logpilot/` - Core modules diff --git a/logpilot/cli.py b/logpilot/cli.py index 4d528cf..a64055a 100644 --- a/logpilot/cli.py +++ b/logpilot/cli.py @@ -71,6 +71,7 @@ def analyze( "--exclude", help="Glob pattern(s) to exclude (repeatable).", ), + model: str = typer.Option("gpt-4", help="LLM model to use (default: gpt-4)"), ): """Analyze logs using Copilot SDK.""" import os @@ -124,7 +125,7 @@ def analyze( if os.environ.get("LOGPILOT_MOCK_LLM") == "1": responses = ["Mocked summary: Something failed" for _ in prompts] else: - llm = LLMClient() + llm = LLMClient(model=model) responses = [llm.analyze(prompt) for prompt in prompts] # 6. Aggregate responses