Skip to content

Commit

Permalink
feat: add support for Claude Sonnet 3.5 v2 (#1888)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaoyun authored Oct 27, 2024
1 parent 6293786 commit f092eed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions relay/adaptor/anthropic/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ var ModelList = []string{
"claude-3-sonnet-20240229",
"claude-3-opus-20240229",
"claude-3-5-sonnet-20240620",
"claude-3-5-sonnet-20241022",
}
1 change: 1 addition & 0 deletions relay/adaptor/aws/claude/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var AwsModelIDMap = map[string]string{
"claude-2.1": "anthropic.claude-v2:1",
"claude-3-sonnet-20240229": "anthropic.claude-3-sonnet-20240229-v1:0",
"claude-3-5-sonnet-20240620": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"claude-3-5-sonnet-20241022": "anthropic.claude-3-5-sonnet-20241022-v2:0",
"claude-3-opus-20240229": "anthropic.claude-3-opus-20240229-v1:0",
"claude-3-haiku-20240307": "anthropic.claude-3-haiku-20240307-v1:0",
}
Expand Down
1 change: 1 addition & 0 deletions relay/billing/ratio/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ var ModelRatio = map[string]float64{
"claude-3-haiku-20240307": 0.25 / 1000 * USD,
"claude-3-sonnet-20240229": 3.0 / 1000 * USD,
"claude-3-5-sonnet-20240620": 3.0 / 1000 * USD,
"claude-3-5-sonnet-20241022": 3.0 / 1000 * USD,
"claude-3-opus-20240229": 15.0 / 1000 * USD,
// https://cloud.baidu.com/doc/WENXINWORKSHOP/s/hlrk4akp7
"ERNIE-4.0-8K": 0.120 * RMB,
Expand Down
2 changes: 1 addition & 1 deletion web/air/src/pages/Channel/EditChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const EditChannel = (props) => {
let localModels = [];
switch (value) {
case 14:
localModels = ["claude-instant-1.2", "claude-2", "claude-2.0", "claude-2.1", "claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240307", "claude-3-5-sonnet-20240620"];
localModels = ["claude-instant-1.2", "claude-2", "claude-2.0", "claude-2.1", "claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240307", "claude-3-5-sonnet-20240620", "claude-3-5-sonnet-20241022"];
break;
case 11:
localModels = ['PaLM-2'];
Expand Down

0 comments on commit f092eed

Please sign in to comment.