Browse Source

Merge pull request #822 from ggozad/fix-tags-api

Fix /api/tags for no models.
Michael Yang 1 năm trước cách đây
mục cha
commit
3a2477174f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      server/routes.go

+ 1 - 1
server/routes.go

@@ -481,7 +481,7 @@ func GetModelInfo(name string) (*api.ShowResponse, error) {
 }
 
 func ListModelsHandler(c *gin.Context) {
-	var models []api.ModelResponse
+	models := make([]api.ModelResponse, 0)
 	fp, err := GetManifestPath()
 	if err != nil {
 		c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})