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

This commit is contained in:
Bruce MacDonald 2023-12-08 14:20:19 -05:00 committed by GitHub
parent 2a2289fb6b
commit e3f925fc1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,