datasette-enrichments-gpt


Namedatasette-enrichments-gpt JSON
Version 0.5 PyPI version JSON
download
home_pageNone
SummaryDatasette enrichment for analyzing row data using OpenAI's GPT models
upload_time2024-05-15 21:49:56
maintainerNone
docs_urlNone
authorSimon Willison
requires_python>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # datasette-enrichments-gpt

[![PyPI](https://img.shields.io/pypi/v/datasette-enrichments-gpt.svg)](https://pypi.org/project/datasette-enrichments-gpt/)
[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-enrichments-gpt?include_prereleases&label=changelog)](https://github.com/datasette/datasette-enrichments-gpt/releases)
[![Tests](https://github.com/datasette/datasette-enrichments-gpt/workflows/Test/badge.svg)](https://github.com/datasette/datasette-enrichments-gpt/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-enrichments-gpt/blob/main/LICENSE)

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

## Installation

Install this plugin in the same environment as Datasette.
```bash
datasette install datasette-enrichments-gpt
```
## Configuration

This plugin can optionally be configured with an [OpenAI API key](https://platform.openai.com/api-keys). You can set this as an environment variable:
```bash
export DATASETTE_SECRETS_OPENAPI_API_KEY=sk-..
```
Or you can configure it using the [datasette-secrets](https://datasette.io/plugins/datasette-secrets) plugin.

If you do not configure an OpenAI API key users will be asked to enter one any time they execute the enrichment. The key they provide will not be stored anywhere other than in-memory during the enrichment run.

## 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-4o`, saving the result of the prompt in the specified column.

The plugin also provides `gpt-4o 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:
```bash
cd datasette-enrichments-gpt
python3 -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
To run the tests:
```bash
pytest
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "datasette-enrichments-gpt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Simon Willison",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ac/33/9921ab268a1f31dc40c7a8e8cd2d56e3db9c89096071345ab50d33853f01/datasette_enrichments_gpt-0.5.tar.gz",
    "platform": null,
    "description": "# datasette-enrichments-gpt\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-enrichments-gpt.svg)](https://pypi.org/project/datasette-enrichments-gpt/)\n[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-enrichments-gpt?include_prereleases&label=changelog)](https://github.com/datasette/datasette-enrichments-gpt/releases)\n[![Tests](https://github.com/datasette/datasette-enrichments-gpt/workflows/Test/badge.svg)](https://github.com/datasette/datasette-enrichments-gpt/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-enrichments-gpt/blob/main/LICENSE)\n\nDatasette enrichment for analyzing row data using OpenAI's GPT models\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n```bash\ndatasette install datasette-enrichments-gpt\n```\n## Configuration\n\nThis plugin can optionally be configured with an [OpenAI API key](https://platform.openai.com/api-keys). You can set this as an environment variable:\n```bash\nexport DATASETTE_SECRETS_OPENAPI_API_KEY=sk-..\n```\nOr you can configure it using the [datasette-secrets](https://datasette.io/plugins/datasette-secrets) plugin.\n\nIf you do not configure an OpenAI API key users will be asked to enter one any time they execute the enrichment. The key they provide will not be stored anywhere other than in-memory during the enrichment run.\n\n## Usage\n\nOnce installed, this plugin will allow users to select rows to enrich and run them through prompts using `gpt-3.5-turbo` or `gpt-4o`, saving the result of the prompt in the specified column.\n\nThe plugin also provides `gpt-4o vision`, which can run prompts against an image identified by a URL.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd datasette-enrichments-gpt\npython3 -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nTo run the tests:\n```bash\npytest\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Datasette enrichment for analyzing row data using OpenAI's GPT models",
    "version": "0.5",
    "project_urls": {
        "CI": "https://github.com/datasette/datasette-enrichments-gpt/actions",
        "Changelog": "https://github.com/datasette/datasette-enrichments-gpt/releases",
        "Homepage": "https://github.com/datasette/datasette-enrichments-gpt",
        "Issues": "https://github.com/datasette/datasette-enrichments-gpt/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea215b8fc281ed6fc5809524fb442ad23a39738da31e1295d2fb3228bc6e1488",
                "md5": "6bbe11d1abb221cfcaa2a6ab3965bb4e",
                "sha256": "aef56b3b3cad6c81c4cd067e3c09e4a24f0d7f4ab346421da1e5f7742922db1e"
            },
            "downloads": -1,
            "filename": "datasette_enrichments_gpt-0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6bbe11d1abb221cfcaa2a6ab3965bb4e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9794,
            "upload_time": "2024-05-15T21:49:47",
            "upload_time_iso_8601": "2024-05-15T21:49:47.367447Z",
            "url": "https://files.pythonhosted.org/packages/ea/21/5b8fc281ed6fc5809524fb442ad23a39738da31e1295d2fb3228bc6e1488/datasette_enrichments_gpt-0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac339921ab268a1f31dc40c7a8e8cd2d56e3db9c89096071345ab50d33853f01",
                "md5": "ba5e4b67f1ebf42f991eac9a2bded0c1",
                "sha256": "d4aa7992ce85ee18a74592c02387b216f40c027553e2ec5e80f140d01b08011f"
            },
            "downloads": -1,
            "filename": "datasette_enrichments_gpt-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ba5e4b67f1ebf42f991eac9a2bded0c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 9740,
            "upload_time": "2024-05-15T21:49:56",
            "upload_time_iso_8601": "2024-05-15T21:49:56.709004Z",
            "url": "https://files.pythonhosted.org/packages/ac/33/9921ab268a1f31dc40c7a8e8cd2d56e3db9c89096071345ab50d33853f01/datasette_enrichments_gpt-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-15 21:49:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "datasette",
    "github_project": "datasette-enrichments-gpt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "datasette-enrichments-gpt"
}
        
Elapsed time: 0.30687s