Skip to main content

A Datasette plugin that turns a Datasette instance into a ChatGPT plugin

Project description

datasette-chatgpt-plugin

PyPI Changelog Tests License

A Datasette plugin that turns a Datasette instance into a ChatGPT plugin - so you can use ChatGPT to ask questions of your data.

For more on this project, see Building a ChatGPT plugin to ask questions of data hosted in Datasette.

Installation

Install this plugin in the same environment as Datasette, on a deployed instance.

datasette install datasette-chatgpt-plugin

Or if you are using datasette publish to deploy Datasette:

datasette publish cloudrun/vercel/fly/heroku data.db \
  --install datasette-chatgpt-plugin

Usage

Once installed, your Datasette instance will work with the new ChatGPT plugins system - provided you have access to that preview.

Click Plugins -> Plugin store -> Install an unverified plugin and enter the URL of your Datasette instance.

ChatGPT will discover the plugin by hitting the /.well-known/ai-plugin.json endpoint.

You can then ask it questions! Some starting examples:

  • Show a list of tables (this is always good to start with as it ensures ChatGPT knows which tables are available)
  • Show the first 10 rows of the mytable table

This plugin currently exposes a single database - the first database attached to your instance.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-chatgpt-plugin
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-chatgpt-plugin-0.1.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

datasette_chatgpt_plugin-0.1-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page