Datasette enrichment for analyzing row data using OpenAI's GPT models
Project description
datasette-enrichments-gpt
Datasette enrichment for analyzing row data using OpenAI's GPT models
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-enrichments-gpt
Configuration
This plugin needs an OpenAI API key. Configure that in metadata.yml
like so
plugins:
datasette-enrichments-gpt:
api_key: sk-..
Or to avoid that key being visible on /-/metadata
set it as an environment variable and use this:
plugins:
datasette-enrichments-gpt:
api_key:
$env: OPENAI_API_KEY
Usage
Once installed, this plugin will allow users to select rows to enrich and run them through prompts using gpt-3.5-turbo
, saving the result of the prompt in the specified column.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-enrichments-gpt
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
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
File details
Details for the file datasette-enrichments-gpt-0.1a0.tar.gz
.
File metadata
- Download URL: datasette-enrichments-gpt-0.1a0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c930b67cb22dbadb867249879da37a4ab5c81c7bc334c937bbe6a7ecc860a3f |
|
MD5 | d0b870ad6bcf5c2ac18594950040fe65 |
|
BLAKE2b-256 | 7feda683bbbca1b4939301cf5a55411b89f13c219af459f8bd481445a2b3f22b |
File details
Details for the file datasette_enrichments_gpt-0.1a0-py3-none-any.whl
.
File metadata
- Download URL: datasette_enrichments_gpt-0.1a0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f452720bad1c17b46377edde7f621b5f21e5d0e047247d0c987cab9a2418ebe0 |
|
MD5 | 0e4b24e2139fe8714c1f238d6418b77d |
|
BLAKE2b-256 | ccf90a13f3d58fb182e6c4d39095cffbf53c068f232503ce848c1d7e303f2b25 |