Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6e3d8b55
authored
Oct 24, 2024
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update claude models
parent
10528988
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
common/model-ratio.go
+1
-0
relay/channel/aws/constants.go
+7
-6
relay/channel/aws/relay-aws.go
+1
-1
relay/channel/claude/constants.go
+1
-0
No files found.
common/model-ratio.go
View file @
6e3d8b55
...
...
@@ -88,6 +88,7 @@ var defaultModelRatio = map[string]float64{
"claude-3-haiku-20240307"
:
0.125
,
// $0.25 / 1M tokens
"claude-3-sonnet-20240229"
:
1.5
,
// $3 / 1M tokens
"claude-3-5-sonnet-20240620"
:
1.5
,
"claude-3-5-sonnet-20241022"
:
1.5
,
"claude-3-opus-20240229"
:
7.5
,
// $15 / 1M tokens
"ERNIE-4.0-8K"
:
0.120
*
RMB
,
"ERNIE-3.5-8K"
:
0.012
*
RMB
,
...
...
relay/channel/aws/constants.go
View file @
6e3d8b55
package
aws
var
awsModelIDMap
=
map
[
string
]
string
{
"claude-instant-1.2"
:
"anthropic.claude-instant-v1"
,
"claude-2.0"
:
"anthropic.claude-v2"
,
"claude-2.1"
:
"anthropic.claude-v2:1"
,
"claude-3-sonnet-20240229"
:
"anthropic.claude-3-sonnet-20240229-v1:0"
,
"claude-3-opus-20240229"
:
"anthropic.claude-3-opus-20240229-v1:0"
,
"claude-3-haiku-20240307"
:
"anthropic.claude-3-haiku-20240307-v1:0"
,
"claude-instant-1.2"
:
"anthropic.claude-instant-v1"
,
"claude-2.0"
:
"anthropic.claude-v2"
,
"claude-2.1"
:
"anthropic.claude-v2:1"
,
"claude-3-sonnet-20240229"
:
"anthropic.claude-3-sonnet-20240229-v1:0"
,
"claude-3-opus-20240229"
:
"anthropic.claude-3-opus-20240229-v1:0"
,
"claude-3-haiku-20240307"
:
"anthropic.claude-3-haiku-20240307-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"
,
}
var
ChannelName
=
"aws"
relay/channel/aws/relay-aws.go
View file @
6e3d8b55
...
...
@@ -53,7 +53,7 @@ func awsModelID(requestModel string) (string, error) {
return
awsModelID
,
nil
}
return
""
,
errors
.
Errorf
(
"model %s not found"
,
requestModel
)
return
requestModel
,
nil
}
func
awsHandler
(
c
*
gin
.
Context
,
info
*
relaycommon
.
RelayInfo
,
requestMode
int
)
(
*
relaymodel
.
OpenAIErrorWithStatusCode
,
*
relaymodel
.
Usage
)
{
...
...
relay/channel/claude/constants.go
View file @
6e3d8b55
...
...
@@ -9,6 +9,7 @@ var ModelList = []string{
"claude-3-opus-20240229"
,
"claude-3-haiku-20240307"
,
"claude-3-5-sonnet-20240620"
,
"claude-3-5-sonnet-20241022"
,
}
var
ChannelName
=
"claude"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment