diff --git a/.opencode.json b/.opencode.json new file mode 100644 index 0000000..7a9541e --- /dev/null +++ b/.opencode.json @@ -0,0 +1 @@ +{ "$schema": "https://opencode.ai/config.json", "model": "ollama/qwen3.5-agent" } diff --git a/scripts/setup-ollama-agents.ps1 b/scripts/setup-ollama-agents.ps1 new file mode 100644 index 0000000..67bf16d --- /dev/null +++ b/scripts/setup-ollama-agents.ps1 @@ -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" \ No newline at end of file