Expose Datasette instances to LLM as a tool
Project description
llm-tools-datasette
Expose Datasette instances to LLM as a tool
Installation
Install this plugin in the same environment as LLM. You'll need at least the 0.26a1 alpha.
llm install llm-tools-datasette
Usage
First find the URL to a database within your Datasette instance. For example, https://datasette.io/content.
To use this with the LLM command-line tool:
llm --tool 'Datasette("https://datasette.io/content")' "Show tables" --td
This plugin works well with llm chat:
llm chat --tool 'Datasette("https://datasette.io/content")' --td
(Omit the --td option if you don't want to see debugging details.)
With the LLM Python API:
import llm
from llm_tools_datasette import Datasette
model = llm.get_model("gpt-4.1-mini")
result = model.chain(
"Show most interesting tables",
tools=[Datasette("https://datasette.io/content")],
).text()
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-tools-datasette
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
llm install -e '.[test]'
To run the tests:
python -m pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_tools_datasette-0.1a1.tar.gz.
File metadata
- Download URL: llm_tools_datasette-0.1a1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aa184c18d52eea3f543614a9a84cd53f46d94f1dadf8fb4db7949c38d8aea6c
|
|
| MD5 |
24a6ade8bc03c102a7695e0248fdf676
|
|
| BLAKE2b-256 |
bf21c0090150ecc0baf4cd694e1179a582d16c9ad7c8f2e07bdc040f76a0c1d8
|
Provenance
The following attestation bundles were made for llm_tools_datasette-0.1a1.tar.gz:
Publisher:
publish.yml on simonw/llm-tools-datasette
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_tools_datasette-0.1a1.tar.gz -
Subject digest:
9aa184c18d52eea3f543614a9a84cd53f46d94f1dadf8fb4db7949c38d8aea6c - Sigstore transparency entry: 220829575
- Sigstore integration time:
-
Permalink:
simonw/llm-tools-datasette@10cb937e1f632e9f2eaae607c1d6a4c91f50c101 -
Branch / Tag:
refs/tags/0.1a1 - Owner: https://github.com/simonw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10cb937e1f632e9f2eaae607c1d6a4c91f50c101 -
Trigger Event:
release
-
Statement type:
File details
Details for the file llm_tools_datasette-0.1a1-py3-none-any.whl.
File metadata
- Download URL: llm_tools_datasette-0.1a1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d77123846b7576645172552e1254dfafad2afeca29b00ee4ad3c0931cacb5787
|
|
| MD5 |
be51532d60de87d70bdf9b46ea1f3168
|
|
| BLAKE2b-256 |
8780c4e747dec5bdd618c3dd2b7d83ca867086d8df2baff3b69b0626ee52430e
|
Provenance
The following attestation bundles were made for llm_tools_datasette-0.1a1-py3-none-any.whl:
Publisher:
publish.yml on simonw/llm-tools-datasette
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_tools_datasette-0.1a1-py3-none-any.whl -
Subject digest:
d77123846b7576645172552e1254dfafad2afeca29b00ee4ad3c0931cacb5787 - Sigstore transparency entry: 220829585
- Sigstore integration time:
-
Permalink:
simonw/llm-tools-datasette@10cb937e1f632e9f2eaae607c1d6a4c91f50c101 -
Branch / Tag:
refs/tags/0.1a1 - Owner: https://github.com/simonw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10cb937e1f632e9f2eaae607c1d6a4c91f50c101 -
Trigger Event:
release
-
Statement type: