Добавление конфигурации Opencode и сценария настройки

This commit is contained in:
2026-04-13 09:53:52 +03:00
parent dbf1e75aa9
commit bf995b162e
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
# setup-ollama-agents.ps1
param(
[int]$QwenCtx = 32768,
[int]$GemmaCtx = 16384
)
function Create-OllamaModel {
param(
[string]$Base,
[string]$Name,
[int]$NumCtx,
[string]$ModelfilePath
)
Write-Host "=== Создаём $Name (num_ctx=$NumCtx) ===" -ForegroundColor Cyan
"FROM $Base`nPARAMETER num_ctx $NumCtx" | Out-File -Encoding utf8 $ModelfilePath
ollama create $Name -f $ModelfilePath
if ($LASTEXITCODE -eq 0) {
Write-Host "OK: $Name создан" -ForegroundColor Green
} else {
Write-Host "FAIL: $Name не создан" -ForegroundColor Red
}
Remove-Item $ModelfilePath -ErrorAction SilentlyContinue
}
Create-OllamaModel -Base "qwen3.5" -Name "qwen3.5-agent" -NumCtx $QwenCtx -ModelfilePath "Modelfile.qwen"
Create-OllamaModel -Base "gemma4" -Name "gemma4-agent" -NumCtx $GemmaCtx -ModelfilePath "Modelfile.gemma"
Write-Host ""
Write-Host "Проверка:" -ForegroundColor Yellow
ollama list | Select-String "agent"