Добавление конфигурации Opencode и сценария настройки
This commit is contained in:
1
.opencode.json
Normal file
1
.opencode.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{ "$schema": "https://opencode.ai/config.json", "model": "ollama/qwen3.5-agent" }
|
||||||
37
scripts/setup-ollama-agents.ps1
Normal file
37
scripts/setup-ollama-agents.ps1
Normal 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"
|
||||||
Reference in New Issue
Block a user