Update model-ratio.go

修复gpt-4-1106-preview和gpt-4-0125-preview的输出倍率错误
This commit is contained in:
xqx333 2024-04-11 14:03:51 +08:00 committed by GitHub
parent 4ef2422b97
commit bf94893f6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -202,7 +202,7 @@ func GetCompletionRatio(name string) float64 {
return 4.0 / 3.0
}
if strings.HasPrefix(name, "gpt-4") {
if strings.HasSuffix(name, "gpt-4-turbo") {
if strings.HasPrefix(name, "gpt-4-turbo")|| strings.HasSuffix(name, "preview") {
return 3
}
return 2