fix: fix preview completion ratio (close #1326)

This commit is contained in:
JustSong 2024-04-21 15:57:01 +08:00
parent 8572fac7a2
commit b2679cca65

View File

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