Josh
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
4 deletions
-
server/routes.go
|
|
|
@ -609,10 +609,9 @@ func (s *Server) CreateModelHandler(c *gin.Context) { |
|
|
|
defer cancel() |
|
|
|
|
|
|
|
quantization := cmp.Or(r.Quantize, r.Quantization) |
|
|
|
if err := CreateModel(ctx, name, filepath.Dir(r.Path), strings.ToUpper(quantization), f, fn); err != nil { |
|
|
|
if errors.Is(err, errBadTemplate) { |
|
|
|
ch <- gin.H{"error": err.Error(), "status": http.StatusBadRequest} |
|
|
|
} |
|
|
|
if err := CreateModel(ctx, name, filepath.Dir(r.Path), strings.ToUpper(quantization), f, fn); errors.Is(err, errBadTemplate) { |
|
|
|
ch <- gin.H{"error": err.Error(), "status": http.StatusBadRequest} |
|
|
|
} else if err != nil { |
|
|
|
ch <- gin.H{"error": err.Error()} |
|
|
|
} |
|
|
|
}() |
|
|
|
|