fix: Improve error handling for model ratio and price validation #800
Some checks failed
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (arm64) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled
Some checks failed
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (arm64) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled
This commit is contained in:
parent
159f39d119
commit
3f7d9c4b0f
@ -147,8 +147,8 @@ func testChannel(channel *model.Channel, testModel string) (err error, openAIErr
|
||||
}
|
||||
modelPrice, usePrice := common.GetModelPrice(testModel, false)
|
||||
modelRatio, success := common.GetModelRatio(testModel)
|
||||
if !success {
|
||||
return fmt.Errorf("模型 %s 倍率未设置", testModel), nil
|
||||
if !usePrice && !success {
|
||||
return fmt.Errorf("模型 %s 倍率和价格均未设置", testModel), nil
|
||||
}
|
||||
completionRatio := common.GetCompletionRatio(testModel)
|
||||
ratio := modelRatio
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user