fix: update audio ratio logic for model names in GetAudioRatio function
This commit is contained in:
@@ -517,18 +517,18 @@ func getHardcodedCompletionModelRatio(name string) (float64, bool) {
|
|||||||
|
|
||||||
func GetAudioRatio(name string) float64 {
|
func GetAudioRatio(name string) float64 {
|
||||||
if strings.Contains(name, "-realtime") {
|
if strings.Contains(name, "-realtime") {
|
||||||
if strings.HasSuffix(name, "gpt-4o-realtime-preview-2024-12-17") {
|
if strings.HasSuffix(name, "gpt-4o-realtime-preview") {
|
||||||
return 8
|
return 8
|
||||||
} else if strings.Contains(name, "mini") {
|
} else if strings.Contains(name, "gpt-4o-mini-realtime-preview") {
|
||||||
return 10 / 0.6
|
return 10 / 0.6
|
||||||
} else {
|
} else {
|
||||||
return 20
|
return 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if strings.Contains(name, "-audio") {
|
if strings.Contains(name, "-audio") {
|
||||||
if strings.HasSuffix(name, "gpt-4o-audio-preview-2024-12-17") {
|
if strings.HasPrefix(name, "gpt-4o-audio-preview") {
|
||||||
return 16
|
return 40 / 2.5
|
||||||
} else if strings.Contains(name, "mini") {
|
} else if strings.HasPrefix(name, "gpt-4o-mini-audio-preview") {
|
||||||
return 10 / 0.15
|
return 10 / 0.15
|
||||||
} else {
|
} else {
|
||||||
return 40
|
return 40
|
||||||
|
|||||||
Reference in New Issue
Block a user