add gpt-4-turbo

Signed-off-by: wozulong <>
This commit is contained in:
wozulong
2024-04-10 11:21:12 +08:00
parent cd3ed22045
commit 149902bd8a
3 changed files with 7 additions and 1 deletions

View File

@@ -21,6 +21,8 @@ var DefaultModelRatio = map[string]float64{
"gpt-4-32k": 30,
"gpt-4-32k-0314": 30,
"gpt-4-32k-0613": 30,
"gpt-4-turbo": 5, // $0.01 / 1K tokens
"gpt-4-turbo-2024-04-09": 5, // $0.01 / 1K tokens
"gpt-4-1106-preview": 5, // $0.01 / 1K tokens
"gpt-4-0125-preview": 5, // $0.01 / 1K tokens
"gpt-4-turbo-preview": 5, // $0.01 / 1K tokens
@@ -203,7 +205,7 @@ func GetCompletionRatio(name string) float64 {
return 1.333333
}
if strings.HasPrefix(name, "gpt-4") {
if strings.HasSuffix(name, "preview") {
if strings.HasSuffix(name, "preview") || strings.HasPrefix(name, "gpt-4-turbo") {
return 3
}
return 2