Anthropic
info
You can get an API key from the Anthropic console.
Chat model
We recommend configuring Claude 3.5 Sonnet as your chat model.
- YAML
- JSON
config.yaml
models:
- name: Claude 3.5 Sonnet
provider: anthropic
model: claude-3-5-sonnet-latest
apiKey: <YOUR_ANTHROPIC_API_KEY>
config.json
{
"models": [
{
"title": "Claude 3.5 Sonnet",
"provider": "anthropic",
"model": "claude-3-5-sonnet-latest",
"apiKey": "<YOUR_ANTHROPIC_API_KEY>"
}
]
}
Autocomplete model
Anthropic currently does not offer any autocomplete models.
Click here to see a list of autocomplete model providers.
Embeddings model
Anthropic currently does not offer any embeddings models.
Click here to see a list of embeddings model providers.
Reranking model
Anthropic currently does not offer any reranking models.
Click here to see a list of reranking model providers.
Prompt caching
Anthropic supports prompt caching with Claude.
To enable caching of the system message and the turn-by-turn conversation, update your your model configuration as following:
- YAML
- JSON
Package or config.yaml
models:
- name: Anthropic
provider: anthropic
model: claude-3-5-sonnet-latest
apiKey: <YOUR_ANTHROPIC_API_KEY>
roles:
- chat
cacheBehavior:
cacheSystemMessage: true
cacheConversation: true
config.json
{
"models": [
{
"cacheBehavior": {
"cacheSystemMessage": true,
"cacheConversation": true
},
"title": "Anthropic",
"provider": "anthropic",
"model": "claude-3-5-sonnet-latest",
"apiKey": "<YOUR_ANTHROPIC_API_KEY>"
}
]
}