feat: replace PPLX_API_KEY with ANTHROPIC_API_KEY in start-lab.bat (#105)
This commit is contained in:
1 parent
95429d9f35
commit
071088715f
1 file changed
+10
-12
+10
-12
@@ -11,27 +11,25 @@ REM - commander-ai-lab built: mvn package "-DskipTests"
|
||||
REM
|
||||
REM Edit the paths below to match your system.
|
||||
REM ═══════════════════════════════════════════════════════════
|
||||
|
||||
REM ── Your Forge paths (EDIT THESE) ──────────────────────────
|
||||
set FORGE_JAR=D:\ForgeCommander\forge-repo\forge-gui-desktop\target\forge-gui-desktop-2.0.12-SNAPSHOT-jar-with-dependencies.jar
|
||||
set FORGE_DIR=D:\ForgeCommander\forge-repo
|
||||
set FORGE_DECKS_DIR=%APPDATA%\Forge\decks\commander
|
||||
|
||||
REM ── Lab JAR (auto-detected from target/) ───────────────────
|
||||
REM ── Lab JAR (auto-detected from target/) ─────────────────────
|
||||
set LAB_PORT=8080
|
||||
|
||||
REM ── API Keys (set via environment variables or .env file) ──
|
||||
REM If not already set in your environment, create a .env file
|
||||
REM in this directory (see .env.example) or set them manually:
|
||||
REM set XIMILAR_API_KEY=your-ximilar-key-here
|
||||
REM set PPLX_API_KEY=your-perplexity-key-here
|
||||
REM set ANTHROPIC_API_KEY=your-anthropic-api-key-here
|
||||
REM
|
||||
REM Load from .env file if it exists and vars aren't already set
|
||||
if not defined XIMILAR_API_KEY (
|
||||
if exist "%~dp0.env" (
|
||||
for /f "usebackq tokens=1,* delims==" %%A in ("%~dp0.env") do (
|
||||
if "%%A"=="XIMILAR_API_KEY" set XIMILAR_API_KEY=%%B
|
||||
if "%%A"=="PPLX_API_KEY" set PPLX_API_KEY=%%B
|
||||
if "%%A"=="ANTHROPIC_API_KEY" set ANTHROPIC_API_KEY=%%B
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -46,10 +44,10 @@ echo Forge Dir: %FORGE_DIR%
|
||||
echo Decks Dir: %FORGE_DECKS_DIR%
|
||||
echo Port: %LAB_PORT%
|
||||
echo Ximilar: Configured
|
||||
if defined PPLX_API_KEY (
|
||||
echo Perplexity: Configured
|
||||
if defined ANTHROPIC_API_KEY (
|
||||
echo Claude Opus: Configured
|
||||
) else (
|
||||
echo Perplexity: Not configured ^(set PPLX_API_KEY env var for AI features^)
|
||||
echo Claude Opus: Not configured ^(set ANTHROPIC_API_KEY env var for AI features^)
|
||||
)
|
||||
echo.
|
||||
|
||||
@@ -84,14 +82,14 @@ if not exist "%~dp0lab_api.py" (
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM ── Install Python deps if needed ──────────────────────────
|
||||
REM ── Install Python deps if needed ───────────────────────────
|
||||
python -c "import fastapi" >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo Installing FastAPI + Uvicorn...
|
||||
pip install fastapi uvicorn
|
||||
)
|
||||
|
||||
REM ── Launch the server ──────────────────────────────────────
|
||||
REM ── Launch the server ───────────────────────────────────────
|
||||
echo.
|
||||
echo Starting Commander AI Lab server...
|
||||
echo Web UI: http://localhost:%LAB_PORT%
|
||||
@@ -99,14 +97,14 @@ echo API: http://localhost:%LAB_PORT%/docs
|
||||
echo Press Ctrl+C to stop.
|
||||
echo.
|
||||
|
||||
if defined PPLX_API_KEY (
|
||||
if defined ANTHROPIC_API_KEY (
|
||||
python "%~dp0lab_api.py" ^
|
||||
--forge-jar "%FORGE_JAR%" ^
|
||||
--forge-dir "%FORGE_DIR%" ^
|
||||
--forge-decks-dir "%FORGE_DECKS_DIR%" ^
|
||||
--port %LAB_PORT% ^
|
||||
--ximilar-key "%XIMILAR_API_KEY%" ^
|
||||
--pplx-key "%PPLX_API_KEY%"
|
||||
--anthropic-key "%ANTHROPIC_API_KEY%"
|
||||
) else (
|
||||
python "%~dp0lab_api.py" ^
|
||||
--forge-jar "%FORGE_JAR%" ^
|
||||
|
||||
Reference in new issue
Block a user