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
Hashes for datasette-enrichments-gpt-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1f4ee728079b1f0291da6ba8cf69b9b0f20a252e020df281dcb45fa4896aca8 |
|
MD5 | 0653c9a706c442c8aed21daa7f7bc1b8 |
|
BLAKE2b-256 | 8220e979a1b208f7f4293bd8a46d63a2c4a01a83d29cd72932cdf8bf3616945a |
Hashes for datasette_enrichments_gpt-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e38edb719a94ab39e1c662bfaf4d1c161360b3f1b83cbf0ecb1be7fc1e62abab |
|
MD5 | b2f566bef49ae872ba75df390c6b2b59 |
|
BLAKE2b-256 | ae9c07a2c8bcbc370691f2f3428a5ac1d94ea4287f0644d21a5028e70dff7602 |