mirror of
https://github.com/ollama/ollama.git
synced 2025-04-06 10:58:36 +02:00
Merge pull request #5448 from ollama/mxyng/fix-generate
use model template by default
This commit is contained in:
commit
e5352297d9
@ -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 == "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user