Merge pull request #5448 from ollama/mxyng/fix-generate
use model template by default
This commit is contained in:
commit
e5352297d9
1 changed files with 1 additions and 5 deletions
|
@ -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 == "" {
|
||||||
|
|
Loading…
Reference in a new issue