Browse Source

fix: restore modelfile system in prompt template (#1425)

Bruce MacDonald 1 year ago
parent
commit
e3f925fc1b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      server/images.go

+ 5 - 0
server/images.go

@@ -64,6 +64,11 @@ func (m *Model) Prompt(p PromptVars) (string, error) {
 		return "", err
 		return "", err
 	}
 	}
 
 
+	if p.System == "" {
+		// use the default system prompt for this model if one is not specified
+		p.System = m.System
+	}
+
 	vars := map[string]any{
 	vars := map[string]any{
 		"System":   p.System,
 		"System":   p.System,
 		"Prompt":   p.Prompt,
 		"Prompt":   p.Prompt,