Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

check other request fields before load short circuit in `/api/generate`

Jeffrey Morgan9b12a511caf9
diff --git a/server/routes.go b/server/routes.go
index 045b1a268..62fd806b8 100644
--- a/server/routes.go
+++ b/server/routes.go
@@ -223,7 +223,8 @@ func GenerateHandler(c *gin.Context) {
ch <- r
}
- if req.Prompt == "" {
+ // an empty request loads the model
+ if req.Prompt == "" && req.Template == "" && req.System == "" {
ch <- api.GenerateResponse{Model: req.Model, Done: true}
} else {
if err := loaded.llm.Predict(c.Request.Context(), req.Context, prompt, fn); err != nil {