[PR #2289] [MERGED] fix: preserve last system message from modelfile #10845

Closed
opened 2026-04-12 23:12:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2289
Author: @BruceMacD
Created: 1/31/2024
Status: Merged
Merged: 2/1/2024
Merged by: @BruceMacD

Base: mainHead: brucemacd/last-sys-modelfile


📝 Commits (1)

  • b030f2b preserve last system message from modelfile

📊 Changes

2 files changed (+66 additions, -17 deletions)

View changed files

📝 server/images.go (+3 -2)
📝 server/images_test.go (+63 -15)

📄 Description

When truncating messages to fit in the context window if the system message from the modelfile was used it was not carried over, this preserves the modelfile system message in the case of truncation.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/2289 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 1/31/2024 **Status:** ✅ Merged **Merged:** 2/1/2024 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `brucemacd/last-sys-modelfile` --- ### 📝 Commits (1) - [`b030f2b`](https://github.com/ollama/ollama/commit/b030f2bf56edda067eabc55df960b6d4c42d5734) preserve last system message from modelfile ### 📊 Changes **2 files changed** (+66 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+3 -2) 📝 `server/images_test.go` (+63 -15) </details> ### 📄 Description When truncating messages to fit in the context window if the system message from the modelfile was used it was not carried over, this preserves the modelfile system message in the case of truncation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:12:38 -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#10845