diff --git a/docs/help.md b/docs/help.md index 6bd512e6..9ae8d571 100644 --- a/docs/help.md +++ b/docs/help.md @@ -75,7 +75,7 @@ Usage: llm prompt [OPTIONS] [PROMPT] Documentation: https://llm.datasette.io/en/stable/usage.html Options: - --system TEXT System prompt to use + -s, --system TEXT System prompt to use -m, --model TEXT Model to use -t, --template TEXT Template to use -p, --param ... Parameters for template diff --git a/docs/usage.md b/docs/usage.md index e4f99b82..8b418f8a 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -52,7 +52,7 @@ This pattern of using `$(command)` inside a double quoted string is a useful way ## System prompts -You can use `--system '...'` to set a system prompt. +You can use `-s/--system '...'` to set a system prompt. llm 'SQL to calculate total sales by month' \ --system 'You are an exaggerated sentient cheesecake that knows SQL and talks about cheesecake a lot' @@ -60,4 +60,4 @@ You can use `--system '...'` to set a system prompt. This is useful for piping content to standard input, for example: curl -s 'https://simonwillison.net/2023/May/15/per-interpreter-gils/' | \ - llm --system 'Suggest topics for this post as a JSON array' + llm -s 'Suggest topics for this post as a JSON array' diff --git a/llm/cli.py b/llm/cli.py index b1e0bc99..54f5d2ec 100644 --- a/llm/cli.py +++ b/llm/cli.py @@ -51,7 +51,7 @@ def cli(): @cli.command(name="prompt") @click.argument("prompt", required=False) -@click.option("--system", help="System prompt to use") +@click.option("-s", "--system", help="System prompt to use") @click.option("model_id", "-m", "--model", help="Model to use") @click.option("-t", "--template", help="Template to use") @click.option( diff --git a/tests/test_templates.py b/tests/test_templates.py index 02f43d43..6fc44c06 100644 --- a/tests/test_templates.py +++ b/tests/test_templates.py @@ -132,7 +132,7 @@ def test_templates_prompt_save(templates_path, args, expected_prompt, expected_e ), ( "boo", - ["--system", "s"], + ["-s", "s"], None, None, "Error: Cannot use -t/--template and --system together",