mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-12-06 00:03:11 +00:00
fix: fail get moel by
multipart/form-data; boundary
This commit is contained in:
1 parent
3ac9ff6028
commit
95a2d02df9
1 file changed
+1
-1
@@ -246,7 +246,7 @@ func getModelRequest(c *gin.Context) (*ModelRequest, bool, error) {
|
||||
modelRequest.Model = common.GetStringIfEmpty(modelRequest.Model, "dall-e")
|
||||
} else if strings.HasPrefix(c.Request.URL.Path, "/v1/images/edits") {
|
||||
//modelRequest.Model = common.GetStringIfEmpty(c.PostForm("model"), "gpt-image-1")
|
||||
contentType := c.Request.Header.Get("Content-Type")
|
||||
contentType := c.ContentType()
|
||||
if slices.Contains([]string{gin.MIMEPOSTForm, gin.MIMEMultipartPOSTForm}, contentType) {
|
||||
modelRequest.Model = c.PostForm("model")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user