From e3f925fc1baeb97a9aa2e08d79dcb829487b7820 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Fri, 8 Dec 2023 14:20:19 -0500 Subject: [PATCH] fix: restore modelfile system in prompt template (#1425) --- server/images.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/images.go b/server/images.go index 68b2770a..2700cb56 100644 --- a/server/images.go +++ b/server/images.go @@ -64,6 +64,11 @@ func (m *Model) Prompt(p PromptVars) (string, error) { 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{ "System": p.System, "Prompt": p.Prompt,