[PR #5196] [MERGED] include modelfile messages #11710

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5196
Author: @mxyng
Created: 6/20/2024
Status: Merged
Merged: 7/31/2024
Merged by: @mxyng

Base: mainHead: mxyng/messages-2


📝 Commits (2)

📊 Changes

4 files changed (+39 additions, -43 deletions)

View changed files

📝 cmd/cmd.go (+16 -1)
📝 cmd/interactive.go (+4 -23)
📝 server/images.go (+1 -6)
📝 server/routes.go (+18 -13)

📄 Description

this change moves the CLI behaviour of prepending Modelfile messages to chat conversations to the server. This allows API calls to easily use these fields. It also extends this to /api/generate requests where messages will only be prepended if context is empty

missing some tests

resolves https://github.com/ollama/ollama-python/issues/117
resolves https://github.com/ollama/ollama-js/issues/109


🔄 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/5196 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 6/20/2024 **Status:** ✅ Merged **Merged:** 7/31/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/messages-2` --- ### 📝 Commits (2) - [`15af558`](https://github.com/ollama/ollama/commit/15af5584238c17ae21853e7619e8008078e6e792) include modelfile messages - [`a250c2c`](https://github.com/ollama/ollama/commit/a250c2cb13fd74b516dd138daad9ca54e30a9fab) display messages ### 📊 Changes **4 files changed** (+39 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+16 -1) 📝 `cmd/interactive.go` (+4 -23) 📝 `server/images.go` (+1 -6) 📝 `server/routes.go` (+18 -13) </details> ### 📄 Description this change moves the CLI behaviour of prepending Modelfile messages to chat conversations to the server. This allows API calls to easily use these fields. It also extends this to /api/generate requests where messages will only be prepended if context is empty missing some tests resolves https://github.com/ollama/ollama-python/issues/117 resolves https://github.com/ollama/ollama-js/issues/109 --- <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:36:36 -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#11710