Add support for Anthropic Claude-3 model in configuration and update Usage.md

This commit is contained in:
mrT23
2024-03-06 08:20:08 +02:00
parent 1c856a7d41
commit 26fb2a4164
2 changed files with 16 additions and 1 deletions

View File

@ -464,6 +464,20 @@ Your [application default credentials](https://cloud.google.com/docs/authenticat
If you do want to set explicit credentials then you can use the `GOOGLE_APPLICATION_CREDENTIALS` environment variable set to a path to a json credentials file. If you do want to set explicit credentials then you can use the `GOOGLE_APPLICATION_CREDENTIALS` environment variable set to a path to a json credentials file.
##### Anthropic
To use Anthropic models, set the relevant models in the configuration section of the configuration file:
```
[config]
model="anthropic/claude-3-opus-20240229"
model_turbo="anthropic/claude-3-opus-20240229"
fallback_models=["anthropic/claude-3-opus-20240229"]
```
And also set the api key in the .secrets.toml file:
```
[anthropic]
KEY = "..."
```
##### Amazon Bedrock ##### Amazon Bedrock
To use Amazon Bedrock and its foundational models, add the below configuration: To use Amazon Bedrock and its foundational models, add the below configuration:

View File

@ -19,7 +19,8 @@ MAX_TOKENS = {
'vertex_ai/codechat-bison-32k': 32000, 'vertex_ai/codechat-bison-32k': 32000,
'codechat-bison': 6144, 'codechat-bison': 6144,
'codechat-bison-32k': 32000, 'codechat-bison-32k': 32000,
'anthropic.claude-v2': 100000,
'anthropic.claude-instant-v1': 100000, 'anthropic.claude-instant-v1': 100000,
'anthropic.claude-v1': 100000, 'anthropic.claude-v1': 100000,
'anthropic.claude-v2': 100000,
'anthropic/claude-3-opus-20240229': 100000,
} }