Skip to content

Commit

Permalink
fix: gpt-4-gizmo-* model ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed May 14, 2024
1 parent ced67b9 commit 9f18641
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/model-ratio.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ func UpdateCompletionRatioByJSONString(jsonStr string) error {
}

func GetCompletionRatio(name string) float64 {
if strings.HasPrefix(name, "gpt-4-gizmo") {
name = "gpt-4-gizmo-*"
}
if strings.HasPrefix(name, "gpt-3.5") {
if name == "gpt-3.5-turbo" || strings.HasSuffix(name, "0125") {
// https://openai.com/blog/new-embedding-models-and-api-updates
Expand All @@ -253,7 +256,7 @@ func GetCompletionRatio(name string) float64 {
}
return 4.0 / 3.0
}
if strings.HasPrefix(name, "gpt-4") && name != "gpt-4-all" && !strings.HasPrefix(name, "gpt-4-gizmo") {
if strings.HasPrefix(name, "gpt-4") && name != "gpt-4-all" && name != "gpt-4-gizmo-*" {
if strings.HasPrefix(name, "gpt-4-turbo") || strings.HasSuffix(name, "preview") || strings.HasPrefix(name, "gpt-4o") {
return 3
}
Expand Down

0 comments on commit 9f18641

Please sign in to comment.