From edc9e2dd7eb17c6eeffc66b53db608a273cdc2e0 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 27 Feb 2025 07:46:34 -0800 Subject: [PATCH] Basic docs for llm schema list, closes #781 --- docs/usage.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/usage.md b/docs/usage.md index e3392f6..1bdb51e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -159,6 +159,7 @@ You can also save the JSON schema to a file and reference the filename using `-- ```bash llm --schema dogs.schema.json 'invent two dogs' ``` + Or save your schema {ref}`to a template ` like this: ```bash @@ -166,6 +167,18 @@ llm --schema dogs.schema.json --save dogs # Then to use it: llm -t dogs 'invent two dogs' ``` +Schemas are logged to your database. You can view stored schemas with: +```bash +llm schemas +``` +And add `-q` one or more times to search: +```bash +llm schemas -q dogs -q bio +``` +You can then use a stored schema ID as an argument to `--schema`: +```bash +llm --schema a75b7b3f00e065247e6e364304338aa5 'five dogs +``` Be warned that different models may support different dialects of the JSON schema specification.