[PR #377] [MERGED] Strip protocol from model path #8865

Closed
opened 2025-11-12 14:54:08 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/377
Author: @rlbaker
Created: 8/18/2023
Status: Merged
Merged: 8/22/2023
Merged by: @jmorganca

Base: mainHead: main


📝 Commits (6)

  • 764cf85 strip protocol from model path
  • 3f37202 add modelpath tests
  • 014aeae clearer test examples
  • 023b97b use strings.Cut
  • 036b30b allow http only when insecure flag is supplied
  • 1cdacc8 pass insecure flag for run commands

📊 Changes

5 files changed (+231 additions, -43 deletions)

View changed files

📝 cmd/cmd.go (+20 -6)
📝 server/images.go (+44 -10)
📝 server/modelpath.go (+39 -26)
server/modelpath_test.go (+122 -0)
📝 server/routes.go (+6 -1)

📄 Description

Took a whack at fixing https://github.com/jmorganca/ollama/issues/371 and reorganized the switch logic slightly as well.

Wasn't sure if it was better to strip all protocols or just https://, so if you'd like the latter I can switch it to just a strings.TrimPrefix. Happy to back out the updated switch code as well, just figured I'd do it while I was in there.

Thanks for a great tool, loving it so far. Hope this is helpful.


🔄 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/377 **Author:** [@rlbaker](https://github.com/rlbaker) **Created:** 8/18/2023 **Status:** ✅ Merged **Merged:** 8/22/2023 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (6) - [`764cf85`](https://github.com/ollama/ollama/commit/764cf8519b9cdd1ba80ac483a9895015b0faddc4) strip protocol from model path - [`3f37202`](https://github.com/ollama/ollama/commit/3f37202b03333e2d1b6b6e7a0d3f09bfc3863e68) add modelpath tests - [`014aeae`](https://github.com/ollama/ollama/commit/014aeaead3981597bcb9d44be40e7a126cc8942f) clearer test examples - [`023b97b`](https://github.com/ollama/ollama/commit/023b97be7922b03e59056f83d5daff315464c60c) use strings.Cut - [`036b30b`](https://github.com/ollama/ollama/commit/036b30b1b8eb732ff40dff12c8ec101c56d775c5) allow http only when insecure flag is supplied - [`1cdacc8`](https://github.com/ollama/ollama/commit/1cdacc88d9123f20225171e5ff5b630e34965dfa) pass insecure flag for run commands ### 📊 Changes **5 files changed** (+231 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+20 -6) 📝 `server/images.go` (+44 -10) 📝 `server/modelpath.go` (+39 -26) ➕ `server/modelpath_test.go` (+122 -0) 📝 `server/routes.go` (+6 -1) </details> ### 📄 Description Took a whack at fixing https://github.com/jmorganca/ollama/issues/371 and reorganized the switch logic slightly as well. Wasn't sure if it was better to strip all protocols or just `https://`, so if you'd like the latter I can switch it to just a `strings.TrimPrefix`. Happy to back out the updated switch code as well, just figured I'd do it while I was in there. Thanks for a great tool, loving it so far. Hope this is helpful. --- <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 2025-11-12 14:54:08 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#8865
No description provided.