Commit graph

294 commits

Author SHA1 Message Date
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
Simon Willison
a880c123bd --tools is now --functions, can be path, can be multiple
Closes #1016
2025-05-13 17:19:30 -07:00
Simon Willison
a50de8b57a ChainResponse.log_to_db() method and test, refs #1017, #1003 2025-05-13 17:19:30 -07:00
Simon Willison
9dae58d05d llm logs tool output, long form, refs #1012 2025-05-13 17:19:30 -07:00
Simon Willison
d9629167bd llm logs tools output for --json and --short
Refs #1012
2025-05-13 17:19:30 -07:00
Simon Willison
7efe51fcb4 Rename --python-tools to --tools, closes #1008 2025-05-13 17:19:30 -07:00
Simon Willison
336948f8fe Better visible error message for cancel
Refs #1005
2025-05-13 17:19:30 -07:00
Simon Willison
e319069503 Initial implementation of --td and --ta, refs #1005
Uses new mechanism from #1007
2025-05-13 17:19:30 -07:00
Simon Willison
288dcb8d46 llm models --tools filter 2025-05-13 17:19:30 -07:00
Simon Willison
9d3bbb05a8 Show tool support on 'llm models --options' 2025-05-13 17:19:30 -07:00
Simon Willison
32cab986ea Log tool stuff to the database, refs #1003 2025-05-13 17:19:30 -07:00
Simon Willison
0f114be5f0 --python-tools option on prompt and tools, closes #995 2025-05-13 17:19:30 -07:00
Simon Willison
8d5fc87028 llm tools and llm tools --json, closes #994 2025-05-13 17:19:30 -07:00
Simon Willison
4ae6d45f3a First working prototype of llm -T toolname
Refs https://github.com/simonw/llm/issues/990#issuecomment-2870630946
2025-05-13 17:19:30 -07:00
Sukhbinder Singh
8c7d33ee52
Fixes --continue bug and adds --database argument to llm chat
* Fix database bug in continue conversation and adds --database to llm chat
* Move the --database to proper place and update help.

Closes #933
2025-05-04 15:57:13 -07:00
Simon Willison
e02863c1ca
Fragment plugins can now optionally return attachments (#974)
Closes #972
2025-05-04 14:50:27 -07:00