From 65a5040e09d34b4e4237a4ac1996e2fb2a112bb3 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 2 Jul 2024 16:42:17 -0700 Subject: [PATCH] fix generate template --- server/routes.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/routes.go b/server/routes.go index 41c92084..b14a146c 100644 --- a/server/routes.go +++ b/server/routes.go @@ -176,11 +176,7 @@ func (s *Server) GenerateHandler(c *gin.Context) { prompt = req.Prompt case req.Prompt != "": if req.Template == "" { - model.Template, err = template.Parse(req.Template) - if err != nil { - c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) - return - } + tmpl = model.Template } if req.System == "" {