fix: improve model ratio handling for reserved models in getHardcodedCompletionModelRatio
This commit is contained in:
parent
5c7395adc6
commit
79c7d8f477
@ -468,7 +468,13 @@ func GetCompletionRatio(name string) float64 {
|
|||||||
|
|
||||||
func getHardcodedCompletionModelRatio(name string) (float64, bool) {
|
func getHardcodedCompletionModelRatio(name string) (float64, bool) {
|
||||||
lowercaseName := strings.ToLower(name)
|
lowercaseName := strings.ToLower(name)
|
||||||
if strings.HasPrefix(name, "gpt-") && !strings.HasSuffix(name, "-all") && !strings.HasSuffix(name, "-gizmo-*") {
|
|
||||||
|
isReservedModel := strings.HasSuffix(name, "-all") || strings.HasSuffix(name, "-gizmo-*")
|
||||||
|
if isReservedModel {
|
||||||
|
return 2, false
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(name, "gpt-") {
|
||||||
if strings.HasPrefix(name, "gpt-4o") {
|
if strings.HasPrefix(name, "gpt-4o") {
|
||||||
if name == "gpt-4o-2024-05-13" {
|
if name == "gpt-4o-2024-05-13" {
|
||||||
return 3, true
|
return 3, true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user