Files
ai/routers/params.go
2023-04-28 16:53:23 +08:00

16 lines
437 B
Go

package routers
import (
"main/utils"
"net/http"
)
func ParamsModelsGet(w http.ResponseWriter, r *http.Request) {
params := make(map[string]interface{})
params["type"] = []string{"lora", "ckp", "hyper", "ti"}
params["status"] = []string{"pending", "running", "finished", "failed"}
params["base_model"] = []string{"SD1.5", "SD2"}
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.Write(utils.ToJSON(params))
}