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

Fix /api/tags for no models.
This commit is contained in:
Michael Yang 2023-10-18 09:34:00 -07:00 committed by GitHub
commit 3a2477174f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()})