[PR #3892] [MERGED] refactor modelfile parser #11310

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3892
Author: @mxyng
Created: 4/24/2024
Status: Merged
Merged: 5/3/2024
Merged by: @mxyng

Base: mainHead: mxyng/parser


📝 Commits (9)

📊 Changes

6 files changed (+748 additions, -206 deletions)

View changed files

📝 cmd/cmd.go (+9 -14)
📝 parser/parser.go (+254 -89)
📝 parser/parser_test.go (+437 -34)
📝 server/images.go (+42 -62)
📝 server/routes.go (+6 -6)
📝 server/routes_test.go (+0 -1)

📄 Description

split from #3833

resolves #3977


🔄 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/3892 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 4/24/2024 **Status:** ✅ Merged **Merged:** 5/3/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/parser` --- ### 📝 Commits (9) - [`c0a00f6`](https://github.com/ollama/ollama/commit/c0a00f68aec6f8f7481be723e56015a8911513dd) refactor modelfile parser - [`2387150`](https://github.com/ollama/ollama/commit/238715037dec4f1afc49b2a008ae26d110133922) linting - [`abe614c`](https://github.com/ollama/ollama/commit/abe614c705736eed06440d657ab75ca094fc78f3) tests - [`8907bf5`](https://github.com/ollama/ollama/commit/8907bf51d235e86854c762870f203380866f1ae3) fix multiline - [`4d08363`](https://github.com/ollama/ollama/commit/4d083635803fa9072c50a37a3cb9e2c5e8f97867) comments - [`176ad3a`](https://github.com/ollama/ollama/commit/176ad3aa6edef56e00edb67ffec720a49a835060) parser: add commands format - [`9cf0f2e`](https://github.com/ollama/ollama/commit/9cf0f2e9736c31bbd00f4671613d0e31ecb3c4ea) use parser.Format instead of templating modelfile - [`bd8eed5`](https://github.com/ollama/ollama/commit/bd8eed57fc7d5f9b9b9d333b9c395864fb2378d8) fix parser name - [`5ea8449`](https://github.com/ollama/ollama/commit/5ea844964e4a59eef8a3162dc0f2e54c16bbb6e2) cmd: import regexp ### 📊 Changes **6 files changed** (+748 additions, -206 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+9 -14) 📝 `parser/parser.go` (+254 -89) 📝 `parser/parser_test.go` (+437 -34) 📝 `server/images.go` (+42 -62) 📝 `server/routes.go` (+6 -6) 📝 `server/routes_test.go` (+0 -1) </details> ### 📄 Description split from #3833 resolves #3977 --- <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:27:28 -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#11310