[GH-ISSUE #1609] "/set template {{ .Prompt }}" sets the system prompt #26653

Closed
opened 2026-04-22 03:04:14 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Sumandora on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1609

Originally assigned to: @mxyng on GitHub.

If the new template is not a multi line string the code will drop into this branch
ed195f3562/cmd/cmd.go (L846)
which won't account for args[1] == "template"
This could be solved in a lot of ways like making a delegate which can be passed into a common implementation of /set or you just put a third if args[1] == "system" {, which will work but might look a bit lazy considering that this would be the third check in 20 lines, maybe extract args[1] == "system" to a variable. There are many ways to solve this, however I sadly don't have the time to fix this myself, hence this is not a pull request

Originally created by @Sumandora on GitHub (Dec 19, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1609 Originally assigned to: @mxyng on GitHub. If the new template is not a multi line string the code will drop into this branch https://github.com/jmorganca/ollama/blob/ed195f3562f2470ff7ac5cff8ce4ab93a98fefb8/cmd/cmd.go#L846 which won't account for `args[1] == "template"` This could be solved in a lot of ways like making a delegate which can be passed into a common implementation of /set or you just put a third `if args[1] == "system" {`, which will work but might look a bit lazy considering that this would be the third check in 20 lines, maybe extract `args[1] == "system"` to a variable. There are many ways to solve this, however I sadly don't have the time to fix this myself, hence this is not a pull request
GiteaMirror added the bug label 2026-04-22 03:04:14 -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#26653