LLM plugin for Anthropic's Claude on AWS Bedrock
Project description
llm-bedrock-anthropic
Plugin for LLM adding support for Anthropic's Claude models.
New: claude opus model
claude-3-opus available on us-west-2
Installation
Install this plugin in the same environment as LLM. From the current directory
llm install llm-bedrock-anthropic
Configuration
You will need to specify AWS Configuration with the normal boto3 and environment variables.
For example, to use the region us-west-2
and AWS credentials under the personal
profile, set the environment variables
export AWS_DEFAULT_REGION=us-west-2
export AWS_PROFILE=personal
Usage
This plugin adds models called bedrock-claude
and bedrock-claude-instant
.
You can query them like this:
llm -m bedrock-claude-instant "Ten great names for a new space station"
llm -m bedrock-claude "Compare and contrast the leadership styles of Abraham Lincoln and Boris Johnson."
Options
max_tokens_to_sample
, default 8_191: The maximum number of tokens to generate before stopping
Use like this:
llm -m bedrock-claude -o max_tokens_to_sample 20 "Sing me the alphabet"
Here is the alphabet song:
A B C D E F G
H I J
bedrock_model_id
: allows you to override themodel_id
passed to Bedrock.
Can be a base model ID or ARN from https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
Can also be an ARN of provisioned throughput for a base or custom model.
Use it like this:
llm -m bedrock-claude-haiku -o bedrock_model_id anthropic.claude-3-sonnet-20240229-v1:0 "Remind me how to post a new version to PyPI"
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
Built Distribution
File details
Details for the file llm_bedrock_anthropic-0.4.4.tar.gz
.
File metadata
- Download URL: llm_bedrock_anthropic-0.4.4.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b3a53069a05712c354190647fe1e1bb572dd19523a7ecb5af8d46547423e2e1 |
|
MD5 | 6688a1446dd9e0932909fcb7e7031ae8 |
|
BLAKE2b-256 | 8e8b83abeac2b15b99333bae690683b15a45ad882c31d408d9a2ad98e217921b |
File details
Details for the file llm_bedrock_anthropic-0.4.4-py3-none-any.whl
.
File metadata
- Download URL: llm_bedrock_anthropic-0.4.4-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28cb9c0f32d74f71413bddd6fbd251ecf6cd41ea720d374551aa5087ffe6344e |
|
MD5 | a50d70c78d77758b7cd7564554edb46d |
|
BLAKE2b-256 | 9fbd4f3a533ba97a411656a3055cca94e173a351162f0e9597fc072dc08f30cb |