Skip to main content

Datasette enrichment for analyzing row data using OpenAI's GPT models

Project description

datasette-enrichments-gpt

PyPI Changelog Tests License

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


Download files

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

Source Distribution

datasette-enrichments-gpt-0.3.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

datasette_enrichments_gpt-0.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file datasette-enrichments-gpt-0.3.tar.gz.

File metadata

File hashes

Hashes for datasette-enrichments-gpt-0.3.tar.gz
Algorithm Hash digest
SHA256 0194580003e9d2179790584c66062552904d054639a23478553383ae30e9c0ea
MD5 ba152ee8697e8c65e7281972d7e76ccf
BLAKE2b-256 f4cef83ac06439cf3a728ad2953a03d72ebfa9e75d40ed69ca5bbb398d329bd6

See more details on using hashes here.

File details

Details for the file datasette_enrichments_gpt-0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_enrichments_gpt-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 392ce49d0e59c81e66362c1addd43bd50d3443708b389a8184d16da28e28b93a
MD5 36cf1646ddf468820b631f74cc0a9092
BLAKE2b-256 f368f4c42a8a39ebb1005c6f9719a1899916745b4a061420bff760a9e182385b

See more details on using hashes here.

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