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
or gpt-4-turbo
, saving the result of the prompt in the specified column.
The plugin also provides gpt-4-turbo vision
, which can run prompts against an image identified by a URL.
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.4.tar.gz
.
File metadata
- Download URL: datasette-enrichments-gpt-0.4.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98143c264fc8938f8fd1882ab2a89a5f2f350ae7d9dde91e201562e90d84d348 |
|
MD5 | e95a05abfb9df244ebf865d9725d8954 |
|
BLAKE2b-256 | 5c51b96f9e5eac803e1ce08d07b3f96aaec316388111641bf55ea10b3527a67d |
File details
Details for the file datasette_enrichments_gpt-0.4-py3-none-any.whl
.
File metadata
- Download URL: datasette_enrichments_gpt-0.4-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c67782046d32a7dc7fa2e1bd2b6eb4c6df7d3812c6b50b31650cec7f076501a |
|
MD5 | fbfc02c2ce0fcf9a636f386662ed7dae |
|
BLAKE2b-256 | 367738d0ae2178a51d6cd086165891844af521c748e151fb25a8c5cccd6d606d |