mirror of
https://github.com/Hopiu/llm.git
synced 2026-05-04 03:44:44 +00:00
-s shortcut for --system, closes #69
This commit is contained in:
parent
b9dd0a34db
commit
714b867e92
4 changed files with 5 additions and 5 deletions
|
|
@ -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 <TEXT TEXT>... Parameters for template
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue