simonw / simonw/llm

Decouple Python API from the io.datasette.llm user directory

Open
#754 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design pre-1.0
Dominant language
Python
Stars
12.5k
Forks
991
Avg merge
3d 13h
Merged PRs (30d)
10

Description

It's a little weird that using the Python API still has bits of code that depend on the ~/.../io.datasette.llm/` directory - it's used for registering models and registering keys too.

It would be nicer if this was a mechanism that was used for the CLI tool but users of the Python library could avoid it entirely if they wanted to.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Python API paths that depend on the io.datasette.llm user directory, including model and key registration, and compare them with the CLI's needs. Determine how the library can avoid that directory while the CLI retains its registration mechanism; done means both use cases work without the Python API requiring the CLI-specific directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.