Download controller/missing_models.go from AZILS/new-api: direct link, hf CLI and curl.
- Browser
- Download file 616 Bytes
-
https://huggingface.co/spaces/AZILS/new-api/resolve/main/controller/missing_models.go
- Command line
-
hf download hf://spaces/AZILS/new-api/controller/missing_models.go
-
curl -L -o missing_models.go https://huggingface.co/spaces/AZILS/new-api/resolve/main/controller/missing_models.go
616 Bytes
| package controller | |
| import ( | |
| "net/http" | |
| "github.com/QuantumNous/new-api/model" | |
| "github.com/gin-gonic/gin" | |
| ) | |
| // GetMissingModels returns the list of model names that are referenced by channels | |
| // but do not have corresponding records in the models meta table. | |
| // This helps administrators quickly discover models that need configuration. | |
| func GetMissingModels(c *gin.Context) { | |
| missing, err := model.GetMissingModels() | |
| if err != nil { | |
| c.JSON(http.StatusOK, gin.H{ | |
| "success": false, | |
| "message": err.Error(), | |
| }) | |
| return | |
| } | |
| c.JSON(http.StatusOK, gin.H{ | |
| "success": true, | |
| "data": missing, | |
| }) | |
| } | |