Added error handling for unsupported image size in
relayImageHelper function
This commit is contained in:
parent
4f90276473
commit
7b5efd9f3e
@ -96,6 +96,8 @@ func relayImageHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode
|
||||
sizeRatio *= 1.5
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return errorWrapper(errors.New("size not supported"), "size_not_supported", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
quota := int(ratio*sizeRatio*1000) * imageRequest.N
|
||||
|
Loading…
Reference in New Issue
Block a user