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

use model template by default
This commit is contained in:
Michael Yang 2024-07-02 16:48:06 -07:00 committed by GitHub
commit e5352297d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 == "" {