merge upstream

Signed-off-by: wozulong <>
This commit is contained in:
wozulong
2024-08-15 22:30:28 +08:00
17 changed files with 276 additions and 213 deletions

View File

@@ -33,6 +33,7 @@ var defaultModelRatio = map[string]float64{
"gpt-4-32k-0613": 30,
"gpt-4o-mini": 0.075, // $0.00015 / 1K tokens
"gpt-4o-mini-2024-07-18": 0.075,
"chatgpt-4o-latest": 2.5, // $0.01 / 1K tokens
"gpt-4o": 2.5, // $0.005 / 1K tokens
"gpt-4o-2024-05-13": 2.5, // $0.005 / 1K tokens
"gpt-4o-2024-08-06": 1.25, // $0.01 / 1K tokens
@@ -343,6 +344,9 @@ func GetCompletionRatio(name string) float64 {
}
return 2
}
if name == "chatgpt-4o-latest" {
return 3
}
if strings.HasPrefix(name, "claude-instant-1") {
return 3
} else if strings.HasPrefix(name, "claude-2") {