Open simonw opened 4 days ago
Here's a but of a weird problem. We're storing fragments
in the logs.db
database - but that means this logic here isn't quite right:
https://github.com/simonw/llm/blob/9b2d4d6256eb82a6a3f67d0e6300f8557778a4c9/llm/cli.py#L476-L482
Here we are only even creating that logs.db
database at the very end of prompt()
if the user has logging enabled.
But now we need that database at the start of that CLI command in case we need to resolve any fragment aliases using it.
It's a bit weird that it's called logs.db
now that it's supporting an additional feature that's not related to if logs are turned on or not. I think I can live with that though.
Lots more fragments available now - I added Datasette, sqlite-utils
, s3-credentials
and shot-scraper
docs to https://github.com/simonw/llm-docs
Refs:
617
TODO:
llm prompt -f alias
work-f
optionllm fragments list
needs non-JSON output (that truncates)llm fragments
family of commandsprompt_json
still duplicates the promptllm logs
to handle this new mechanismllm chat
- so you can dollm chat -f docs