mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-10 21:17:08 +00:00
parent
cde31cb220
commit
c2e3b89176
@ -416,6 +416,11 @@ func CreateModelHandler(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Count(req.Name, ":") > 1 {
|
||||||
|
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "':' (colon) is not allowed in tag names"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if req.Path == "" && req.Modelfile == "" {
|
if req.Path == "" && req.Modelfile == "" {
|
||||||
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "path or modelfile are required"})
|
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "path or modelfile are required"})
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user