mirror of
https://github.com/linux-do/new-api.git
synced 2025-10-21 06:43:41 +08:00
fix: 模型固定价格为空时错误使用默认价格
This commit is contained in:
@@ -29,7 +29,7 @@ func InitTokenEncoders() {
|
||||
if err != nil {
|
||||
common.FatalLog(fmt.Sprintf("failed to get gpt-4 token encoder: %s", err.Error()))
|
||||
}
|
||||
for model, _ := range common.ModelRatio {
|
||||
for model, _ := range common.DefaultModelRatio {
|
||||
if strings.HasPrefix(model, "gpt-3.5") {
|
||||
tokenEncoderMap[model] = gpt35TokenEncoder
|
||||
} else if strings.HasPrefix(model, "gpt-4") {
|
||||
|
Reference in New Issue
Block a user