File size: 545 Bytes
f25362a
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[CmdletBinding()]
param(
  [Parameter(Mandatory=$true)][string]$Model,
  [ValidateSet("ollama","gguf")][string]$Backend="ollama"
)
$Root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
if ($Backend -eq "ollama") {
  $OllamaExe = Join-Path $Root "backends\ollama\windows\ollama.exe"
  if (!(Test-Path $OllamaExe)) { throw "Missing Ollama binary." }
  $env:OLLAMA_MODELS = Join-Path $Root "models\ollama"
  & $OllamaExe pull $Model
  exit $LASTEXITCODE
}
throw "GGUF add requires a signed model pack or a URL in manifest/model-sources.json."