[PR #70] [MERGED] offline fixes #56660

Closed
opened 2026-04-29 11:11:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/70
Author: @mxyng
Created: 7/11/2023
Status: Merged
Merged: 7/11/2023
Merged by: @mxyng

Base: mainHead: offline-fixes


📝 Commits (4)

📊 Changes

6 files changed (+143 additions, -144 deletions)

View changed files

📝 api/client.go (+23 -5)
📝 cmd/cmd.go (+14 -5)
📝 go.mod (+0 -1)
📝 go.sum (+0 -2)
📝 server/models.go (+45 -56)
📝 server/routes.go (+61 -75)

📄 Description

two fixes bundled into one pr

  1. pull should not block generate. this changes the status code when the remote models are inaccessible so as to not block a generate which may already be available in the file system
  2. use a temporary file during pull operations to separate a partial file from a completed file. this enables a better existence check

this pr also refactors both the server and client to better share code between similar operations. of note is the change to the pull operation where instead of taking a channel, saveModel takes a funcptr to mirror generate and enabling common stream producer code


🔄 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/70 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 7/11/2023 **Status:** ✅ Merged **Merged:** 7/11/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `offline-fixes` --- ### 📝 Commits (4) - [`2a66a11`](https://github.com/ollama/ollama/commit/2a66a1164a009f597f8931f155e18b05777c6602) common stream producer - [`e243329`](https://github.com/ollama/ollama/commit/e243329e2eb529e8ffab1f3d9af5f5aefd7ed8f1) check api status - [`948323f`](https://github.com/ollama/ollama/commit/948323fa78067084ba2046e750a1d0d8e7de3034) rename partial file - [`a806b03`](https://github.com/ollama/ollama/commit/a806b03f6213d12e0b901f236bfeda306324c17e) no errgroup ### 📊 Changes **6 files changed** (+143 additions, -144 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+23 -5) 📝 `cmd/cmd.go` (+14 -5) 📝 `go.mod` (+0 -1) 📝 `go.sum` (+0 -2) 📝 `server/models.go` (+45 -56) 📝 `server/routes.go` (+61 -75) </details> ### 📄 Description two fixes bundled into one pr 1. pull should not block generate. this changes the status code when the remote models are inaccessible so as to not block a generate which may already be available in the file system 2. use a temporary file during pull operations to separate a partial file from a completed file. this enables a better existence check this pr also refactors both the server and client to better share code between similar operations. of note is the change to the pull operation where instead of taking a channel, `saveModel` takes a funcptr to mirror generate and enabling common stream producer code --- <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-29 11:11:37 -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#56660