llm-palm


Namellm-palm JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/simonw/llm-palm
SummaryPlugin for LLM adding support for Google's PaLM 2 model
upload_time2023-07-12 14:38:39
maintainer
docs_urlNone
authorSimon Willison
requires_python>=3.9
licenseApache License, Version 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # llm-palm

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

Plugin for [LLM](https://llm.datasette.io/) adding support for Google's PaLM 2 model.

## Installation

Install this plugin in the same environment as LLM.
```bash
llm install llm-palm
```
## Configuration

You will need an API key from Google. Instructions for obtaining one: https://developers.generativeai.google/tutorials/setup

You can set that as an environment variable called `PALM_API_KEY`, or add it to the `llm` set of saved keys using:

```bash
llm keys set palm
```
```
Enter key: <paste key here>
```

## Usage

This plugin adds a model called `palm`. You can execute it like this:

```bash
llm -m palm "Ten great names for a pet pelican"
```
PaLM also supports system prompts:
```bash
echo "I like pelicans a lot" | llm -m palm --system "Translate to french"
```

## Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

    cd llm-palm
    python3 -m venv venv
    source venv/bin/activate

Now install the dependencies and test dependencies:

    pip install -e '.[test]'

To run the tests:

    pytest

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/simonw/llm-palm",
    "name": "llm-palm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "Simon Willison",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/8b/f4/1cb9aad948f715a8af64c2dd5cc34d64b0c2f6b5c7864d0de22602b24864/llm-palm-0.1.tar.gz",
    "platform": null,
    "description": "# llm-palm\n\n[![PyPI](https://img.shields.io/pypi/v/llm-palm.svg)](https://pypi.org/project/llm-palm/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/llm-palm?include_prereleases&label=changelog)](https://github.com/simonw/llm-palm/releases)\n[![Tests](https://github.com/simonw/llm-palm/workflows/Test/badge.svg)](https://github.com/simonw/llm-palm/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/llm-palm/blob/main/LICENSE)\n\nPlugin for [LLM](https://llm.datasette.io/) adding support for Google's PaLM 2 model.\n\n## Installation\n\nInstall this plugin in the same environment as LLM.\n```bash\nllm install llm-palm\n```\n## Configuration\n\nYou will need an API key from Google. Instructions for obtaining one: https://developers.generativeai.google/tutorials/setup\n\nYou can set that as an environment variable called `PALM_API_KEY`, or add it to the `llm` set of saved keys using:\n\n```bash\nllm keys set palm\n```\n```\nEnter key: <paste key here>\n```\n\n## Usage\n\nThis plugin adds a model called `palm`. You can execute it like this:\n\n```bash\nllm -m palm \"Ten great names for a pet pelican\"\n```\nPaLM also supports system prompts:\n```bash\necho \"I like pelicans a lot\" | llm -m palm --system \"Translate to french\"\n```\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n    cd llm-palm\n    python3 -m venv venv\n    source venv/bin/activate\n\nNow install the dependencies and test dependencies:\n\n    pip install -e '.[test]'\n\nTo run the tests:\n\n    pytest\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "Plugin for LLM adding support for Google's PaLM 2 model",
    "version": "0.1",
    "project_urls": {
        "CI": "https://github.com/simonw/llm-palm/actions",
        "Changelog": "https://github.com/simonw/llm-palm/releases",
        "Homepage": "https://github.com/simonw/llm-palm",
        "Issues": "https://github.com/simonw/llm-palm/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a92ff0b51f78fc93b2c9b1a7975621fe106e5a1992de3681650abe7fa0443a8",
                "md5": "1908a0d158f2079f51ca2a7ae5bc864a",
                "sha256": "d31664052710394bfc806eea9892ace239cbccdbc7d13da6098982e06cad5eea"
            },
            "downloads": -1,
            "filename": "llm_palm-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1908a0d158f2079f51ca2a7ae5bc864a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7108,
            "upload_time": "2023-07-12T14:38:37",
            "upload_time_iso_8601": "2023-07-12T14:38:37.998630Z",
            "url": "https://files.pythonhosted.org/packages/6a/92/ff0b51f78fc93b2c9b1a7975621fe106e5a1992de3681650abe7fa0443a8/llm_palm-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8bf41cb9aad948f715a8af64c2dd5cc34d64b0c2f6b5c7864d0de22602b24864",
                "md5": "5f799d5fc1a8e7409318152754ef30f8",
                "sha256": "874fe85be2338b8e49cc5423e465afb7cc1fe80bfc2ac62b7402d6a2fa220e58"
            },
            "downloads": -1,
            "filename": "llm-palm-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5f799d5fc1a8e7409318152754ef30f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7632,
            "upload_time": "2023-07-12T14:38:39",
            "upload_time_iso_8601": "2023-07-12T14:38:39.571969Z",
            "url": "https://files.pythonhosted.org/packages/8b/f4/1cb9aad948f715a8af64c2dd5cc34d64b0c2f6b5c7864d0de22602b24864/llm-palm-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 14:38:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simonw",
    "github_project": "llm-palm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "llm-palm"
}
        
Elapsed time: 0.10289s