[GH-ISSUE #1060] Allow templating the reply in the Modelfile template #521

Closed
opened 2026-04-12 10:13:01 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @BruceMacD on GitHub (Nov 9, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1060

It should be possible to add formatting after the LLM reply. This is the best I can come up with:

{{- if not .First }}
<|im_end|>
{{- end }}
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant

But I want this:

<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
{{ .Reply }}<|im_end|>
Originally created by @BruceMacD on GitHub (Nov 9, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1060 It should be possible to add formatting after the LLM reply. This is the best I can come up with: ``` {{- if not .First }} <|im_end|> {{- end }} <|im_start|>user {{ .Prompt }}<|im_end|> <|im_start|>assistant ``` But I want this: ``` <|im_start|>user {{ .Prompt }}<|im_end|> <|im_start|>assistant {{ .Reply }}<|im_end|> ```
GiteaMirror added the feature request label 2026-04-12 10:13:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#521