File size: 1,573 Bytes
b4d7558
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# CodeVerse Local LLM Setup Script (Windows)
# This script installs Ollama and pulls the Qwen 2.5 Coder 1.5B model.

function Write-Host-Color($msg, $color) {
    Write-Host "[CodeVerse] $msg" -ForegroundColor $color
}

Write-Host-Color "Starting Local LLM Setup..." "Cyan"

# 1. Check if Ollama is installed
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"
}

# 2. Check if Ollama service is running
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
}

# 3. Pull Qwen 2.5 Coder 1.5B
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"