-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple Python API from the io.datasette.llm user directory #754
Comments
The main thing here is the way plugins register their models in files in that directory like There's also the way keys are looked up - this function is called by the Lines 222 to 246 in 8611d92
Which calls: Lines 249 to 254 in 8611d92
|
One way to do this could be to have a llm = LLM("/path/to/config-dir/") The existing default_llm = LLM(llm.user_dir())
def get_models():
return default_llm.get_models() |
It would be nicer if the config dir wasn't actually needed by most plugins (except the ones that actually need to store binary data in disk) - so any JSON configs etc could optionally be provided as a Python dictionary instead of being looked up on disk. |
Started a |
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.
The text was updated successfully, but these errors were encountered: