文件历史

309 次代码提交

作者 SHA1 备注 提交日期
Simon Willison c8889e0a76 Ran black 2026-03-17 11:25:12 -07:00
Simon Willison 683ca204b2 Ensure -x/--xl work with -t 2026-03-17 11:22:34 -07:00
Simon Willison 6b84a0d36b Only do model_aluases=get_model_aliases() if needed by --save
I do not think this prevents hitting all the plugins for every prompt though
but it least we no longer hit all the plugins twice.
2026-01-19 13:19:57 -08:00
Simon Willison 5d237ce6ce Show options in Markdown logs output, closes #1322 2025-12-17 22:19:33 -08:00
Giuseppe Rota 618463de13 fix: register fragment source in chat command (#1316)
* Register fragment source in chat command
2025-12-11 13:54:32 -08:00
Simon Willison 14c2e2ab7e Move the import to a better spot, refs #1309 2025-11-25 22:20:05 -08:00
Simon Willison a0ac68c452 Custom HTTP user-agent for llm -f URL, closes #1309 2025-11-25 22:07:11 -08:00
Simon Willison c41c122239 Use tools in templates with llm chat, closes #1239 2025-08-11 22:11:17 -07:00
Simon Willison 2f206d0e26 Fix for duplicated prompts in llm chat with templates, closes #1240
Also includes a bug fix for system fragments, see https://github.com/simonw/llm/issues/1240#issuecomment-3177684518
2025-08-11 21:52:54 -07:00
Simon Willison e6ac18fbcb Fix for confusing error, closes #1238 2025-08-11 16:52:16 -07:00
Simon Willison 9f1417f6e8 Fix for enum options and --save, refs #1237 2025-08-11 16:16:27 -07:00
Simon Willison 5204a11f33 Allow -o option when calling tools, closes #1233 2025-08-11 13:44:26 -07:00
Simon Willison 08094082f2 Toolbox.add_tool(), prepare() and prepare_async() methods
Closes #1111
2025-08-11 13:19:31 -07:00
Simon Willison 0863ed460e llm logs -l/--latest -q option, closes #1177 2025-06-17 23:23:45 -07:00
Simon Willison d96ae4ed8d Fix --async logging to database, closes #1150 2025-06-01 17:38:26 -07:00
Simon Willison 65dde782b7 Fix mypy warning, closes #1146 2025-06-01 17:03:44 -07:00
Simon Willison 30e0c4abe8 ToolResult.exception for tool errors, now logged to DB
Closes #1104
2025-06-01 17:01:40 -07:00
Sukhbinder Singh f5a38d3342 Add -h shortcut for --help
Closes #983, #1134
2025-06-01 12:31:02 -07:00
Simon Willison ed64fc3362 chain_limit/before_call/after_call for conversations
* chain_limit/before_call/after_call for conversations, closes #1088
* Docs for before_call/after_call including for model.conversation
2025-06-01 12:00:29 -07:00
Simon Willison b5d1c5ee90 Tools can now return attachments
Closes #1014

- llm.ToolOutput(output='...', attachments=[...]) for tools to return attachments
- New table: `tool_results_attachments`
- Table is populated when tools return attachments
- llm --tools-debug shows attachments returned by tools
- llm logs shows attachments returned by tools
2025-06-01 10:08:36 -07:00
Simon Willison fd2f0ffbcd Better error on llm templates show, closes #1053 2025-05-31 17:26:07 -07:00
Simon Willison a3a2996fed Tools in templates (#1138)
Closes #1009
2025-05-30 17:44:52 -07:00
Simon Willison 301db6d76c responses.resolved_model column and response.set_resolved_model(model_id) method, closes #1117 2025-05-28 07:17:03 -07:00
Simon Willison d1c5c688e2 Error on llm -c with a Toolbox, closes #1101
Refs #1092
2025-05-26 21:51:16 -07:00
Simon Willison 57459c0a6e Fix the tests I broke in #1096 2025-05-26 19:02:14 -07:00
Simon Willison bb336d33a0 Toolbox class for class-based tool collections (#1086)
* Toolbox class for class-based tool collections

Refs #1059, #1058, #1057
2025-05-25 22:42:52 -07:00
Simon Willison abc4f473f4 --td now pretty-prints JSON if possible, closes #1083 2025-05-25 12:59:48 -07:00
Simon Willison 7837335eea Remove colon in Token usage header for consistency
More consistent with other headings in logs now.
2025-05-24 16:55:05 -07:00
André Arko fc44fd6a0d llm chat now respects default model options (#985) 2025-05-24 14:24:53 -07:00
Simon Willison a7c51e2871 Don't execute fragments/attachments in !edit sessions, closes #1074 2025-05-23 23:44:24 -07:00
Abizer Lokhandwala 9dace69af7 bugfix: cast path to str in templates_edit (#1031) 2025-05-23 23:34:16 -07:00
Dan Turkel 88d3e11c65 Support fragments in chat through -f, --sf, and !fragments (#1048)
* add vscode and uv artifacts to gitignore
* !fragment feature
* Update fragment command to accept multiple fragments
* Add support for multiple fragments in !fragment command, factor out fragment processing
* Add support for fragment/system fragment arguments in chat command
* update docs

---------

Co-authored-by: Simon Willison <swillison@gmail.com>
2025-05-23 23:31:16 -07:00
Dan Turkel 1d5d73481a Filter IDs with --prefix in llm similar (#1052) 2025-05-23 22:54:55 -07:00
Simon Willison 70092f2e78 llm logs --tools flag, closes #1072 2025-05-23 21:58:24 -07:00
Simon Willison 8a1fc5a90e llm logs --tool/-T option, closes #1013 2025-05-23 21:46:10 -07:00
Simon Willison 36477cf9e5 llm chat -c and llm -c carry forward tools, closes #1020 2025-05-23 21:10:51 -07:00
Simon Willison d2886d4692 Record which plugin a tool came from, including in DB - refs #1020 2025-05-23 15:44:12 -07:00
Simon Willison cb94047b46 Removed obsolete code I accidentally added in #1070 2025-05-23 15:22:32 -07:00
Simon Willison f6fefb3816 llm schemas list --json/--nl options, closes #1070 2025-05-23 15:17:32 -07:00
Simon Willison 5f44f89de2 Ident + tests for tool logging, closes #1042 2025-05-21 22:04:12 -07:00
Simon Willison bd2180df7d llm chat --tool and --functions (#1062)
* Tool support for llm chat, closes #1004
2025-05-20 21:30:27 -07:00
Simon Willison a31ae86c20 Refactor in prep for chat tools, refs #1004 2025-05-20 20:23:48 -07:00
Simon Willison a3414ed15d llm install --pre option, closes #1060 2025-05-20 18:25:42 -07:00
Simon Willison f879b816e4 llm plugins --hook X option, closes #1047 2025-05-18 14:50:34 -04:00
Simon Willison f320de1b0c LLM_TOOLS_DEBUG env var, closes #1045 2025-05-17 22:38:15 -04:00
Simon Willison 2df619e7d8 --chain-limit option, closes #1025 2025-05-13 21:52:39 -04:00
Simon Willison c81f0560e0 Fixed remaining mypy problems, refs #1023
Refs https://github.com/simonw/llm/pull/996#issuecomment-2878191352
2025-05-13 17:19:30 -07:00
Simon Willison 511892b30c Fix for Error binding parameter 2: type 'coroutine' is not supported 2025-05-13 17:19:30 -07:00
Simon Willison c586f389e1 Better display of --tools-debug/--td
Refs https://github.com/simonw/llm/issues/1005#issuecomment-2878164610
2025-05-13 17:19:30 -07:00
Simon Willison d986f98416 Better output for --ta/--tools-approve
Refs https://github.com/simonw/llm/issues/1005#issuecomment-2878163701
2025-05-13 17:19:30 -07:00