[PR #898] [MERGED] create remote models #72675

Closed
opened 2026-05-05 04:13:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/898
Author: @mxyng
Created: 10/24/2023
Status: Merged
Merged: 11/16/2023
Merged by: @mxyng

Base: mainHead: mxyng/build-context


📝 Commits (10+)

📊 Changes

6 files changed (+371 additions, -194 deletions)

View changed files

📝 api/client.go (+25 -1)
📝 api/types.go (+4 -3)
📝 cmd/cmd.go (+59 -13)
📝 docs/api.md (+53 -3)
📝 server/images.go (+146 -171)
📝 server/routes.go (+84 -3)

📄 Description

This PR changes the way /api/create works and addresses some of the current deficiencies:

  1. The API now takes the Modelfile contents. If the field is empty, it'll be populated by reading the file set in the path field
  2. Add two new APIs to facilitate checking the existence of layers. This is required for detecting which layers the server already has in its blob store
  3. Update the create command to use these server changes. If the CLI finds a layer isn't known to the server using GET /api/layer/:digest/path, it'll create it with POST /api/layer/:digest. It'll then update it to the location relative to the server before sending the commands over to the server

Resolves #891
Resolves #892
Resolves #613
Resolves #1066
Resolves #1113
Resolves #315
Resolves #1143


🔄 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/898 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 10/24/2023 **Status:** ✅ Merged **Merged:** 11/16/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/build-context` --- ### 📝 Commits (10+) - [`b0d14ed`](https://github.com/ollama/ollama/commit/b0d14ed51c459d3c63649ebcaa8c581431a946ae) refactor create model - [`3ca56b5`](https://github.com/ollama/ollama/commit/3ca56b5adafb6a46465024df1d9a4d52a6ae4f2f) add create modelfile field - [`1552cee`](https://github.com/ollama/ollama/commit/1552cee59f6080fc8b74e81317e94381d2e1844a) client create modelfile - [`a07c935`](https://github.com/ollama/ollama/commit/a07c935d345bef1bce4f3411da0e4b69fa9bf266) ignore non blobs - [`cac11c9`](https://github.com/ollama/ollama/commit/cac11c9137294961adbb08a6c279ab652af3bcdc) update api docs - [`d660eeb`](https://github.com/ollama/ollama/commit/d660eebf22c11c5b13bc990aaa4f9bf538bc5480) fix create from model tag - [`1901044`](https://github.com/ollama/ollama/commit/1901044b075517fc48a298d044227db9666e3904) use checksum reference - [`71d71d0`](https://github.com/ollama/ollama/commit/71d71d09889e1c2cea16ecf6c20d9c30f35a12e0) update docs - [`bc22d5a`](https://github.com/ollama/ollama/commit/bc22d5a38b22d894468362307304e931be91c2b0) no blob response - [`652d90e`](https://github.com/ollama/ollama/commit/652d90e1c76e48a56c96c77528cffebdcc632c60) Update server/images.go ### 📊 Changes **6 files changed** (+371 additions, -194 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+25 -1) 📝 `api/types.go` (+4 -3) 📝 `cmd/cmd.go` (+59 -13) 📝 `docs/api.md` (+53 -3) 📝 `server/images.go` (+146 -171) 📝 `server/routes.go` (+84 -3) </details> ### 📄 Description This PR changes the way `/api/create` works and addresses some of the current deficiencies: 1. The API now takes the Modelfile contents. If the field is empty, it'll be populated by reading the file set in the `path` field 2. Add two new APIs to facilitate checking the existence of layers. This is required for detecting which layers the server already has in its blob store 3. Update the `create` command to use these server changes. If the CLI finds a layer isn't known to the server using `GET /api/layer/:digest/path`, it'll create it with `POST /api/layer/:digest`. It'll then update it to the location relative to the server before sending the commands over to the server Resolves #891 Resolves #892 Resolves #613 Resolves #1066 Resolves #1113 Resolves #315 Resolves #1143 --- <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-05-05 04:13:34 -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#72675