feat: support xunfei's llm (close #206)

This commit is contained in:
JustSong
2023-07-29 21:55:57 +08:00
parent 36edbea583
commit 11e62bb63f
9 changed files with 363 additions and 43 deletions
+2
View File
@@ -157,6 +157,7 @@ const (
ChannelTypeBaidu = 15
ChannelTypeZhipu = 16
ChannelTypeAli = 17
ChannelTypeXunfei = 18
)
var ChannelBaseURLs = []string{
@@ -178,4 +179,5 @@ var ChannelBaseURLs = []string{
"https://aip.baidubce.com", // 15
"https://open.bigmodel.cn", // 16
"https://dashscope.aliyuncs.com", // 17
"", // 18
}
+1
View File
@@ -49,6 +49,7 @@ var ModelRatio = map[string]float64{
"chatglm_lite": 0.1429, // ¥0.002 / 1k tokens
"qwen-v1": 0.8572, // TBD: https://help.aliyun.com/document_detail/2399482.html?spm=a2c4g.2399482.0.0.1ad347feilAgag
"qwen-plus-v1": 0.5715, // Same as above
"SparkDesk": 0.8572, // TBD
}
func ModelRatio2JSONString() string {