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
22f1c13a
authored
Mar 08, 2024
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update claude default model ratio
parent
a1d8626a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
common/model-ratio.go
+10
-6
relay/channel/claude/constants.go
+1
-1
web/src/pages/Channel/EditChannel.js
+1
-1
No files found.
common/model-ratio.go
View file @
22f1c13a
...
@@ -61,8 +61,11 @@ var ModelRatio = map[string]float64{
...
@@ -61,8 +61,11 @@ var ModelRatio = map[string]float64{
"text-moderation-latest"
:
0.1
,
"text-moderation-latest"
:
0.1
,
"dall-e-2"
:
8
,
"dall-e-2"
:
8
,
"dall-e-3"
:
16
,
"dall-e-3"
:
16
,
"claude-instant-1"
:
0.815
,
// $1.63 / 1M tokens
"claude-instant-1"
:
0.4
,
// $0.8 / 1M tokens
"claude-2"
:
5.51
,
// $11.02 / 1M tokens
"claude-2.0"
:
4
,
// $8 / 1M tokens
"claude-2.1"
:
4
,
// $8 / 1M tokens
"claude-3-sonnet-20240229"
:
1.5
,
// $3 / 1M tokens
"claude-3-opus-20240229"
:
7.5
,
// $15 / 1M tokens
"ERNIE-Bot"
:
0.8572
,
// ¥0.012 / 1k tokens
"ERNIE-Bot"
:
0.8572
,
// ¥0.012 / 1k tokens
"ERNIE-Bot-turbo"
:
0.5715
,
// ¥0.008 / 1k tokens
"ERNIE-Bot-turbo"
:
0.5715
,
// ¥0.008 / 1k tokens
"ERNIE-Bot-4"
:
8.572
,
// ¥0.12 / 1k tokens
"ERNIE-Bot-4"
:
8.572
,
// ¥0.12 / 1k tokens
...
@@ -179,10 +182,11 @@ func GetCompletionRatio(name string) float64 {
...
@@ -179,10 +182,11 @@ func GetCompletionRatio(name string) float64 {
return
2
return
2
}
}
if
strings
.
HasPrefix
(
name
,
"claude-instant-1"
)
{
if
strings
.
HasPrefix
(
name
,
"claude-instant-1"
)
{
return
3.38
return
3
}
}
else
if
strings
.
HasPrefix
(
name
,
"claude-2"
)
{
if
strings
.
HasPrefix
(
name
,
"claude-2"
)
{
return
3
return
2.965517
}
else
if
strings
.
HasPrefix
(
name
,
"claude-3"
)
{
return
5
}
}
return
1
return
1
}
}
relay/channel/claude/constants.go
View file @
22f1c13a
package
claude
package
claude
var
ModelList
=
[]
string
{
var
ModelList
=
[]
string
{
"claude-instant-1"
,
"claude-2"
,
"claude-2.0"
,
"claude-2.1"
,
"claude-3-sonnet-20240229"
,
"claude-3-opus-20240229"
,
"claude-instant-1
.2
"
,
"claude-2"
,
"claude-2.0"
,
"claude-2.1"
,
"claude-3-sonnet-20240229"
,
"claude-3-opus-20240229"
,
}
}
var
ChannelName
=
"claude"
var
ChannelName
=
"claude"
web/src/pages/Channel/EditChannel.js
View file @
22f1c13a
...
@@ -63,7 +63,7 @@ const EditChannel = (props) => {
...
@@ -63,7 +63,7 @@ const EditChannel = (props) => {
let
localModels
=
[];
let
localModels
=
[];
switch
(
value
)
{
switch
(
value
)
{
case
14
:
case
14
:
localModels
=
[
"claude-instant-1"
,
"claude-2"
,
"claude-2.0"
,
"claude-2.1"
,
"claude-3-sonnet-20240229"
,
"claude-3-opus-20240229"
];
localModels
=
[
"claude-instant-1
.2
"
,
"claude-2"
,
"claude-2.0"
,
"claude-2.1"
,
"claude-3-sonnet-20240229"
,
"claude-3-opus-20240229"
];
break
;
break
;
case
11
:
case
11
:
localModels
=
[
'PaLM-2'
];
localModels
=
[
'PaLM-2'
];
...
...
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