Commit 094f932c by CaIon

feat: update model ratio

parent 91800c24
...@@ -5,7 +5,7 @@ import ( ...@@ -5,7 +5,7 @@ import (
"strings" "strings"
) )
//from songquanpeng/one-api // from songquanpeng/one-api
const ( const (
USD2RMB = 7.3 // 暂定 1 USD = 7.3 RMB USD2RMB = 7.3 // 暂定 1 USD = 7.3 RMB
USD = 500 // $0.002 = 1 -> $1 = 500 USD = 500 // $0.002 = 1 -> $1 = 500
...@@ -289,7 +289,7 @@ func GetCompletionRatio(name string) float64 { ...@@ -289,7 +289,7 @@ func GetCompletionRatio(name string) float64 {
} }
return 4.0 / 3.0 return 4.0 / 3.0
} }
if strings.HasPrefix(name, "gpt-4") && name != "gpt-4-all" && name != "gpt-4-gizmo-*" { if strings.HasPrefix(name, "gpt-4") && !strings.HasSuffix(name, "-all") && !strings.Contains(name, "gizmo") {
if strings.HasPrefix(name, "gpt-4-turbo") || strings.HasSuffix(name, "preview") || strings.HasPrefix(name, "gpt-4o") { if strings.HasPrefix(name, "gpt-4-turbo") || strings.HasSuffix(name, "preview") || strings.HasPrefix(name, "gpt-4o") {
return 3 return 3
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment