-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Using GPT Pilot with Anthropic models
Senko Rašić edited this page Mar 20, 2024
·
11 revisions
GPT Pilot 0.1.7 and higher have experimental support for Anthropic models - Claude 3 Opus, Sonnet and Haiku.
To use Anthropic, you'll need their API key. Then follow these steps:
-
Install Anthropic Python package in GPT Pilot's virtual environment:
cd /path/to/gpt-pilot source pilot-env/bin/activate # or pilot-env\scripts\activate in Windows pip install -r requirements.txt # or just pip install anthropic if you're upgrading
-
Edit
.env
file in thepilot
subdirectory to add:-
ANTHROPIC_API_KEY
- your Anthropic API key -
MODEL_NAME
- this uses gpt4-turbo-preview by default, change it toanthropic/
+ model name (see below)
If you're using Anthropic via a proxy or through AWS Bedrock, you'll also need to set
ANTHROPIC_ENDPOINT
accordingly. -
To get the correct Anthropic model name, check their models overview documentation. For example, to use Opus (claude-3-opus-20240229
) with GPT Pilot, you'd set:
ANTHROPIC_API_KEY=yourkey
MODEL_NAME=anthropic/claude-3-opus-20240229
Note: this support is currently experimental. If you try it, we'd love to hear from you!