🐛 fix usage error & web channel edit label error

This commit is contained in:
Martial BE
2023-12-21 16:52:00 +08:00
parent 43d8bedbb4
commit b0fefd6dc5
8 changed files with 32 additions and 12 deletions

View File

@@ -19,7 +19,7 @@ func (c *OpenAIProviderImageResponseResponse) ResponseHandler(resp *http.Respons
func (p *OpenAIProvider) ImageGenerationsAction(request *types.ImageRequest, isModelMapped bool, promptTokens int) (usage *types.Usage, errWithCode *types.OpenAIErrorWithStatusCode) {
if isWithinRange(request.Model, request.N) == false {
if !isWithinRange(request.Model, request.N) {
return nil, common.StringErrorWrapper("n_not_within_range", "n_not_within_range", http.StatusBadRequest)
}