feat: add support for xAI

This commit is contained in:
Ryo Shen
2024-11-07 13:34:08 +08:00
parent 7e51b04221
commit 4b32c6142b
10 changed files with 29 additions and 2 deletions

View File

@@ -208,6 +208,8 @@ var ModelRatio = map[string]float64{
"deepl-zh": 25.0 / 1000 * USD,
"deepl-en": 25.0 / 1000 * USD,
"deepl-ja": 25.0 / 1000 * USD,
// https://console.x.ai/
"grok-beta": 5.0 / 1000 * USD,
}
var CompletionRatio = map[string]float64{
@@ -372,6 +374,8 @@ func GetCompletionRatio(name string, channelType int) float64 {
return 3
case "command-r-plus":
return 5
case "grok-beta":
return 3
}
return 1
}