[PR #4240] [CLOSED] reference license, template, system as files #21964

Closed
opened 2026-04-19 15:59:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4240
Author: @mxyng
Created: 5/7/2024
Status: Closed

Base: mxyng/create-contextHead: mxyng/layers-from-files


📝 Commits (3)

  • d46f6ea err on insecure path
  • e401a23 cmd build context
  • b7860f1 reference license, template, system as files

📊 Changes

4 files changed (+134 additions, -77 deletions)

View changed files

📝 cmd/cmd.go (+93 -69)
📝 server/images.go (+16 -1)
📝 server/model.go (+3 -5)
📝 server/model_test.go (+22 -2)

📄 Description

this change allows certain layers to take files as values. the final value for the layer is the content of the file

FROM llama3
LICENSE ./meta-llama/Meta-Llama-3-8B-Instruct/LICENSE
LICENSE ./meta-llama/Meta-Llama-3-8B-Instruct/USE_POLICY.md

any value that does not reference a file will use the original value

FROM foo
TEMPLATE {{ .System }} {{ .Prompt }}

the file value does not support wildcards or globs


🔄 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/4240 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 5/7/2024 **Status:** ❌ Closed **Base:** `mxyng/create-context` ← **Head:** `mxyng/layers-from-files` --- ### 📝 Commits (3) - [`d46f6ea`](https://github.com/ollama/ollama/commit/d46f6ea512516f388b64765c8ba6778561ae530f) err on insecure path - [`e401a23`](https://github.com/ollama/ollama/commit/e401a23d6294ac6ecabed2624631abd51f3079c3) cmd build context - [`b7860f1`](https://github.com/ollama/ollama/commit/b7860f12ad0db384fcee24882ddc23950ce16745) reference license, template, system as files ### 📊 Changes **4 files changed** (+134 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+93 -69) 📝 `server/images.go` (+16 -1) 📝 `server/model.go` (+3 -5) 📝 `server/model_test.go` (+22 -2) </details> ### 📄 Description this change allows certain layers to take files as values. the final value for the layer is the content of the file ``` FROM llama3 LICENSE ./meta-llama/Meta-Llama-3-8B-Instruct/LICENSE LICENSE ./meta-llama/Meta-Llama-3-8B-Instruct/USE_POLICY.md ``` any value that does not reference a file will use the original value ``` FROM foo TEMPLATE {{ .System }} {{ .Prompt }} ``` the file value does not support wildcards or globs --- <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-19 15:59:16 -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#21964