Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions ods/installers/windows/install-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2301,6 +2301,15 @@ if ($enableVoice) {
}
}

$readinessEnv = Get-WindowsODSEnvMap -InstallDir $installDir
function Get-ReadinessPort {
param([string]$Name, [string]$Default)
if ($readinessEnv.ContainsKey($Name) -and -not [string]::IsNullOrWhiteSpace($readinessEnv[$Name])) {
return $readinessEnv[$Name]
}
return $Default
}

# ── Auto-configure Perplexica ─────────────────────────────────────────────────
if (Test-ODSWindowsServiceEnabled -ServiceId "perplexica" -Plan $servicePlan) {
Write-AI "Configuring Perplexica..."
Expand Down Expand Up @@ -2341,23 +2350,15 @@ if (Test-ODSWindowsServiceEnabled -ServiceId "perplexica" -Plan $servicePlan) {
if (($useLemonade -or $cloudMode -or $switchboardMode -eq "enabled") -and $windowsEnvMap.ContainsKey("LITELLM_KEY") -and -not [string]::IsNullOrWhiteSpace($windowsEnvMap["LITELLM_KEY"])) {
$perplexicaApiKey = $windowsEnvMap["LITELLM_KEY"]
}
$perplexicaOk = Set-PerplexicaConfig -PerplexicaPort 3004 -LlmModel $perplexicaModel -LlmBaseUrl $perplexicaBaseUrl -ApiKey $perplexicaApiKey
$perplexicaPort = Get-ReadinessPort -Name "PERPLEXICA_PORT" -Default "3004"
$perplexicaOk = Set-PerplexicaConfig -PerplexicaPort $perplexicaPort -LlmModel $perplexicaModel -LlmBaseUrl $perplexicaBaseUrl -ApiKey $perplexicaApiKey
if ($perplexicaOk) {
Write-AISuccess "Perplexica configured (model: $perplexicaModel)"
} else {
Write-AIWarn "Perplexica auto-config skipped -- complete setup at http://localhost:3004"
Write-AIWarn "Perplexica auto-config skipped -- complete setup at http://localhost:$perplexicaPort"
}
}

$readinessEnv = Get-WindowsODSEnvMap -InstallDir $installDir
function Get-ReadinessPort {
param([string]$Name, [string]$Default)
if ($readinessEnv.ContainsKey($Name) -and -not [string]::IsNullOrWhiteSpace($readinessEnv[$Name])) {
return $readinessEnv[$Name]
}
return $Default
}

$dashboardPort = Get-ReadinessPort -Name "DASHBOARD_PORT" -Default "3001"
$webuiPort = Get-ReadinessPort -Name "WEBUI_PORT" -Default "3000"
$dashboardApiPort = Get-ReadinessPort -Name "DASHBOARD_API_PORT" -Default "3002"
Expand Down
Loading