jackailocal / windows /Add-Model.ps1
jackboy70's picture
Deploy: accurate lite-builder note
f25362a
Raw
History Blame Contribute Delete
545 Bytes
[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."