Unverified Commit e5352297 authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

Merge pull request #5448 from ollama/mxyng/fix-generate

use model template by default
parents d626b99b 65a5040e
...@@ -176,11 +176,7 @@ func (s *Server) GenerateHandler(c *gin.Context) { ...@@ -176,11 +176,7 @@ func (s *Server) GenerateHandler(c *gin.Context) {
prompt = req.Prompt prompt = req.Prompt
case req.Prompt != "": case req.Prompt != "":
if req.Template == "" { if req.Template == "" {
model.Template, err = template.Parse(req.Template) tmpl = model.Template
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
} }
if req.System == "" { if req.System == "" {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment