| |
| |
|
|
| function Write-Host-Color($msg, $color) { |
| Write-Host "[CodeVerse] $msg" -ForegroundColor $color |
| } |
|
|
| Write-Host-Color "Starting Local LLM Setup..." "Cyan" |
|
|
| |
| if (Get-Command ollama -ErrorAction SilentlyContinue) { |
| Write-Host-Color "Ollama is already installed." "Green" |
| } else { |
| Write-Host-Color "Ollama not found. Downloading installer..." "Yellow" |
| Invoke-WebRequest -Uri "https://ollama.com/download/OllamaSetup.exe" -OutFile "$env:TEMP\OllamaSetup.exe" |
| Write-Host-Color "Running installer. Please follow the on-screen instructions..." "Yellow" |
| Start-Process "$env:TEMP\OllamaSetup.exe" -Wait |
| Write-Host-Color "Ollama installed. Note: You might need to restart this terminal." "Green" |
| } |
|
|
| |
| Write-Host-Color "Verifying Ollama service..." "Cyan" |
| $ollamaCheck = curl.exe -s http://localhost:11434/api/tags |
| if ($LASTEXITCODE -ne 0) { |
| Write-Host-Color "Ollama is not running. Please start the Ollama application from your tray." "Red" |
| return |
| } |
|
|
| |
| Write-Host-Color "Pulling Qwen 2.5 Coder 1.5B (optimized for 2vCPU / 16GB RAM)..." "Cyan" |
| ollama pull qwen2.5-coder:1.5b |
|
|
| Write-Host-Color "Setup Complete! You can now select 'Qwen 2.5 Coder 1.5B (Local)' in the Agent panel." "Green" |
| Write-Host-Color "Note: If running CodeVerse in Docker, ensure OLLAMA_BASE_URL=http://host.docker.internal:11434/v1 is set in your .env" "Yellow" |
|
|