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
4ec4db5a
authored
May 18, 2024
by
Calcium-Ion
Committed by
GitHub
May 18, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #265 from jimmyshjj/original
Update Perplexity and 01AI models
parents
b927bb15
3f6aeaa0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
7 deletions
+26
-7
common/model-ratio.go
+24
-3
relay/channel/lingyiwanwu/constrants.go
+1
-3
relay/channel/perplexity/constants.go
+1
-1
No files found.
common/model-ratio.go
View file @
4ec4db5a
...
...
@@ -5,6 +5,13 @@ import (
"strings"
)
//from songquanpeng/one-api
const
(
USD2RMB
=
7.3
// 暂定 1 USD = 7.3 RMB
USD
=
500
// $0.002 = 1 -> $1 = 500
RMB
=
USD
/
USD2RMB
)
// modelRatio
// https://platform.openai.com/docs/models/model-endpoint-compatibility
// https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Blfmc9dlf
...
...
@@ -115,9 +122,18 @@ var DefaultModelRatio = map[string]float64{
"hunyuan"
:
7.143
,
// ¥0.1 / 1k tokens // https://cloud.tencent.com/document/product/1729/97731#e0e6be58-60c8-469f-bdeb-6c264ce3b4d0
// https://platform.lingyiwanwu.com/docs#-计费单元
// 已经按照 7.2 来换算美元价格
"yi-34b-chat-0205"
:
0.018
,
"yi-34b-chat-200k"
:
0.0864
,
"yi-vl-plus"
:
0.0432
,
"yi-34b-chat-0205"
:
0.18
,
"yi-34b-chat-200k"
:
0.864
,
"yi-vl-plus"
:
0.432
,
"yi-large"
:
20.0
/
1000
*
RMB
,
"yi-medium"
:
2.5
/
1000
*
RMB
,
"yi-vision"
:
6.0
/
1000
*
RMB
,
"yi-medium-200k"
:
12.0
/
1000
*
RMB
,
"yi-spark"
:
1.0
/
1000
*
RMB
,
"yi-large-rag"
:
25.0
/
1000
*
RMB
,
"yi-large-turbo"
:
12.0
/
1000
*
RMB
,
"yi-large-preview"
:
20.0
/
1000
*
RMB
,
"yi-large-rag-preview"
:
25.0
/
1000
*
RMB
,
"command"
:
0.5
,
"command-nightly"
:
0.5
,
"command-light"
:
0.5
,
...
...
@@ -126,6 +142,11 @@ var DefaultModelRatio = map[string]float64{
"command-r-plus "
:
1.5
,
"deepseek-chat"
:
0.07
,
"deepseek-coder"
:
0.07
,
// Perplexity online 模型对搜索额外收费,有需要应自行调整,此处不计入搜索费用
"llama-3-sonar-small-32k-chat"
:
0.2
/
1000
*
USD
,
"llama-3-sonar-small-32k-online"
:
0.2
/
1000
*
USD
,
"llama-3-sonar-large-32k-chat"
:
1
/
1000
*
USD
,
"llama-3-sonar-large-32k-online"
:
1
/
1000
*
USD
,
}
var
DefaultModelPrice
=
map
[
string
]
float64
{
...
...
relay/channel/lingyiwanwu/constrants.go
View file @
4ec4db5a
...
...
@@ -3,9 +3,7 @@ package lingyiwanwu
// https://platform.lingyiwanwu.com/docs
var
ModelList
=
[]
string
{
"yi-34b-chat-0205"
,
"yi-34b-chat-200k"
,
"yi-vl-plus"
,
"yi-large"
,
"yi-medium"
,
"yi-vision"
,
"yi-medium-200k"
,
"yi-spark"
,
"yi-large-rag"
,
"yi-large-turbo"
,
"yi-large-preview"
,
"yi-large-rag-preview"
,
}
var
ChannelName
=
"lingyiwanwu"
relay/channel/perplexity/constants.go
View file @
4ec4db5a
package
perplexity
var
ModelList
=
[]
string
{
"
sonar-small-chat"
,
"sonar-small-online"
,
"sonar-medium-chat"
,
"sonar-medium-online"
,
"mistral-7
b-instruct"
,
"mixtral-8x7b-instruct"
,
"
llama-3-sonar-small-32k-chat"
,
"llama-3-sonar-small-32k-online"
,
"llama-3-sonar-large-32k-chat"
,
"llama-3-sonar-large-32k-online"
,
"llama-3-8b-instruct"
,
"llama-3-70
b-instruct"
,
"mixtral-8x7b-instruct"
,
}
var
ChannelName
=
"perplexity"
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