feat: add support for xAI (#1915)

This commit is contained in:
Ryo Shen
2024-11-07 23:52:38 +08:00
committed by GitHub
parent b0b88a79ff
commit 8ec092ba44
10 changed files with 29 additions and 2 deletions

View File

@@ -209,6 +209,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{
@@ -373,6 +375,8 @@ func GetCompletionRatio(name string, channelType int) float64 {
return 3
case "command-r-plus":
return 5
case "grok-beta":
return 3
}
return 1
}