[PR #1222] [MERGED] fix relative path on create #41762

Closed
opened 2026-04-24 21:35:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1222
Author: @BruceMacD
Created: 11/21/2023
Status: Merged
Merged: 11/21/2023
Merged by: @BruceMacD

Base: mainHead: brucemacd/fix-path


📝 Commits (3)

📊 Changes

2 files changed (+18 additions, -13 deletions)

View changed files

📝 server/images.go (+14 -9)
📝 server/routes.go (+4 -4)

📄 Description

This fixes a regression in the API. Previously calling the API directly with a modelfile that has a relative file would work.

Ex:

FROM nous-capybara-34b.Q4_0.gguf
TEMPLATE "USER: { .Prompt } ASSISTANT: "
curl -X POST http://localhost:11434/api/create -d '{
    "name": "bruce/nous-capybara",
    "path": "/Users/bruce/models/nous-capybara/Modelfile"
}'

part of #1217


🔄 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/1222 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 11/21/2023 **Status:** ✅ Merged **Merged:** 11/21/2023 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `brucemacd/fix-path` --- ### 📝 Commits (3) - [`5204cb0`](https://github.com/ollama/ollama/commit/5204cb0bdf0304b4feb634c6b6119674d1f8233f) fix relative path on create - [`908c14b`](https://github.com/ollama/ollama/commit/908c14b49e91efda676ed72fe485aac81d7e8e35) PR feedback - [`bb00887`](https://github.com/ollama/ollama/commit/bb00887df902d9790b0c0820644dc77152f02f34) var rename ### 📊 Changes **2 files changed** (+18 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+14 -9) 📝 `server/routes.go` (+4 -4) </details> ### 📄 Description This fixes a regression in the API. Previously calling the API directly with a modelfile that has a relative file would work. Ex: ``` FROM nous-capybara-34b.Q4_0.gguf TEMPLATE "USER: { .Prompt } ASSISTANT: " ``` ``` curl -X POST http://localhost:11434/api/create -d '{ "name": "bruce/nous-capybara", "path": "/Users/bruce/models/nous-capybara/Modelfile" }' ``` part of #1217 --- <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-24 21:35:39 -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#41762