Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/just-cameron/letta-openwebui. A Letta fork of OpenWebUI
Something went wrong. Try again.
1.3 kB · 34 lines
1234567891011121314151617181920212223242526272829303132333435$ErrorActionPreference = "Stop"Set-StrictMode -Version Latest
$RootDir = Split-Path -Parent $PSScriptRoot$TokenFile = Join-Path $RootDir ".secrets/app-server-token"$EnvFile = Join-Path $RootDir ".env"
if (-not (Test-Path $TokenFile) -or -not (Test-Path $EnvFile)) { throw "Run .\scripts\setup.ps1 first."}
$Settings = @{}Get-Content $EnvFile | ForEach-Object { if ($_ -and -not $_.StartsWith("#") -and $_.Contains("=")) { $Parts = $_.Split("=", 2) $Settings[$Parts[0]] = $Parts[1] }}
$Token = (Get-Content $TokenFile -Raw).Trim()$Headers = @{ Authorization = "Bearer $Token" }$Models = Invoke-RestMethod -Uri "http://127.0.0.1:4500/v1/models" -Headers $Headers -TimeoutSec 10$AgentCount = @($Models.data).Countif ($AgentCount -eq 0) { throw "Letta App Server is running, but it reported no local agents."}
$HostAddress = if ($Settings.OPENWEBUI_HOST) { $Settings.OPENWEBUI_HOST } else { "127.0.0.1" }$Port = if ($Settings.OPENWEBUI_PORT) { $Settings.OPENWEBUI_PORT } else { "3000" }$WebUI = Invoke-RestMethod -Uri "http://${HostAddress}:${Port}/api/version" -TimeoutSec 10
Write-Host "Letta App Server: ready ($AgentCount agents)"Write-Host "OpenWebUI: ready (v$($WebUI.version))"Write-Host "Open: http://${HostAddress}:${Port}"