Skip to main content

LLM access to Claude 3 by Anthropic

Project description

llm-claude-3

PyPI Changelog Tests License

LLM access to Claude 3 by Anthropic

Installation

Install this plugin in the same environment as LLM.

llm install llm-claude-3

Usage

First, set an API key for Claude 3:

llm keys set claude
# Paste key here

Run llm models to list the models, and llm models --options to include a list of their options.

Run prompts like this:

llm -m claude-3.5-sonnet 'Fun facts about pelicans'
llm -m claude-3.5-haiku 'Fun facts about armadillos'
llm -m claude-3-opus 'Fun facts about squirrels'

Images are supported too:

llm -m claude-3.5-sonnet 'describe this image' -a https://static.simonwillison.net/static/2024/pelicans.jpg
llm -m claude-3-haiku 'extract text' -a page.png

Development

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

cd llm-claude-3
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

llm 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

llm_claude_3-0.8.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

llm_claude_3-0.8-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file llm_claude_3-0.8.tar.gz.

File metadata

  • Download URL: llm_claude_3-0.8.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for llm_claude_3-0.8.tar.gz
Algorithm Hash digest
SHA256 a7886e4f4693d9aa109c332352129b363c8bab62dc2f2d9293fb2873436474df
MD5 32e13ed9f855760da4ba5324c8eba6ac
BLAKE2b-256 1b3bb83b107d993ee77584893c97161faa64f164e96d15d90c6db081d32136c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_claude_3-0.8.tar.gz:

Publisher: publish.yml on simonw/llm-claude-3

Attestations:

File details

Details for the file llm_claude_3-0.8-py3-none-any.whl.

File metadata

  • Download URL: llm_claude_3-0.8-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for llm_claude_3-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3f8930c2a2d23a86a4c15e04f8ef530d81c7445395b72c866967296c7f842e52
MD5 34ecfcbce283a2b7cbd6c9efc7ab1473
BLAKE2b-256 5b4db0c1666ce08310317673cdd77009ae00b8acb553d627c2bb2bbc1f81c44d

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_claude_3-0.8-py3-none-any.whl:

Publisher: publish.yml on simonw/llm-claude-3

Attestations:

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