Introduce the concept of an LLM environment
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by tracing how the CLI uses the user_dir at ~/Library/Application Support/io.datasette.llm and how Python library users access the same settings. Define the environment's handling of default models, aliases, and plugin model storage, including whether plugin storage is shared. Done means the CLI and independently instantiated library environments have clear, documented storage behavior.
Written by the indexing model from the issue text.
Description
LLM currently keeps a bunch of its settings in that user_dir - on macOS that's ~/Library/Application Support/io.datasette.llm
This makes sense for a CLI tool, but it doesn't make sense when LLM is being used as a Python library independently of the CLI.
I'm going to introduce the concept of an "environment". The CLI tool will use an environment that stores things in that folder, but Python library users will have the option to instantiate an environment of their own that's not tied to that folder.
Things an environment needs to be able to handle:
- What default models have been set?
- What aliases are configured?
- The tricky bit: what folder should plugins etc store their models in?
That last one is difficult because it actually does make sense for plugins to share model storage between the CLI tool and the Python library usage.
Need to think about this a bit more.
- Dominant language
- Python
- Stars
- 12.5k
- Forks
- 998
- Avg merge
- 6d 12h
- Merged PRs (30d)
- 15
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from simonw/llm
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100