Commit graph

26 commits

Author SHA1 Message Date
Simon Willison
bfbcc201b7 Don't require input if template does not use $input, closes #835 2025-03-15 19:17:36 -07:00
Simon Willison
bc692e1f19 Templates only require input if they use $input 2025-03-15 19:06:41 -07:00
Simon Willison
1bebf8b34a --schema t:template-name option, plus improved schema docs
Closes #799, refs #788
2025-02-27 17:25:31 -08:00
Simon Willison
b1fe2e9857 sort_keys=False in --save, closes #798 2025-02-27 16:51:43 -08:00
Simon Willison
a0845874ec
Schema template --save --schema support
* Don't hang on stdin if llm -t template-with-schema
* Docs on using schemas with templates
* Schema in template YAML file example
* Test for --save with --schema

Refs #778
2025-02-27 07:19:15 -08:00
Simon Willison
000e984def --extract support for templates, closes #681 2024-12-19 07:16:48 -08:00
Simon Willison
758ff9ac17 Upgrade to pytest-httpx>=0.33.0 2024-10-28 15:41:34 -07:00
Simon Willison
db1d77f486 assert_all_responses_were_requested=False 2024-10-28 15:41:34 -07:00
Andrew Wason
a466ddf3cd
Fix broken tests. Drop python 3.8. (#580)
* Fix broken tests.  Drop python 3.8.
* Test on Python 3.13 too

---------

Co-authored-by: Simon Willison <swillison@gmail.com>
2024-10-27 11:26:47 -07:00
Simon Willison
a83421607a Switch default model to gpt-4o-mini (from gpt-3.5-turbo), refs #536 2024-07-18 11:57:19 -07:00
Simon Willison
214fcaaf86
Upgrade to run against OpenAI >= 1.0
* strategy: fail-fast: false - to help see all errors
* Apply latest Black

Refs #325
2024-01-25 22:00:44 -08:00
Simon Willison
4d46ebaa32 OpenAI completion models including gpt-3.5-turbo-instruct, refs #284 2023-09-18 18:34:32 -07:00
Simon Willison
0eeb8393ca llm models and llm templates default to list, closes #167 2023-08-19 20:04:14 -07:00
Simon Willison
2d3ebe7fe1 llm logs now uses new DB schema, refs #91 2023-07-11 07:21:22 -07:00
Simon Willison
a421aab7f0 Renamed template.execute() to template.evaluate() and added type hints 2023-07-10 08:27:28 -07:00
Simon Willison
8f7450bd74 Fixed a test 2023-07-01 11:03:16 -07:00
Simon Willison
714b867e92 -s shortcut for --system, closes #69 2023-07-01 10:46:20 -07:00
Simon Willison
9f1085eece --save now stores -p as default parameters, closes #58 2023-06-23 07:51:50 -07:00
Sébastien De Revière
059bc1a5fe Handle error when no templates are found (#47)
Thanks, @sderev
2023-06-23 07:38:13 -07:00
Simon Willison
f4ce9ea77d Applied Black 2023-06-18 09:48:49 +01:00
Chris Mungall
482292b7d7 Add a defaults parameter to templates. (#57)
This allows default values to be filled for templates.

For example:
```yaml
prompt: Summarize this text in the voice of $voice
defaults:
  voice: GlaDOS
```
2023-06-17 23:49:27 +01:00
Simon Willison
0b65aefb6e llm prompt ... --save templatename shortcut, closes #55 2023-06-17 23:22:59 +01:00
Simon Willison
0e0be4db28 Better display of system and prompt, refs #44 2023-06-17 10:10:10 +01:00
Simon Willison
b573096d59 Show system prompts in llm templates list, closes #44 2023-06-17 10:08:30 +01:00
Simon Willison
19e6945dde Fix newline issue in llm templates list, closes #42 2023-06-17 09:51:16 +01:00
Simon Willison
144ffc3f6b Prompt templates
Closes #23
2023-06-17 08:40:46 +01:00