File size: 1,365 Bytes
927854c |
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
@echo off
REM Test Novita AI connection using Anaconda environment
REM This script activates the conda environment and runs the test
echo ============================================================
echo Testing Novita AI Connection with Anaconda
echo ============================================================
echo.
REM Check if conda is available
where conda >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo ERROR: conda command not found
echo Please activate Anaconda Prompt first or add conda to PATH
goto :end
)
echo Step 1: Checking conda environments...
call conda env list
echo.
echo Step 2: Creating environment if it doesn't exist...
call conda env create -f environment.yml --name research-ai-assistant 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Environment may already exist, continuing...
)
echo.
echo Step 3: Activating environment and running test...
call conda activate research-ai-assistant
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Failed to activate environment
echo Try: conda activate research-ai-assistant
goto :end
)
echo.
echo Step 4: Installing openai package if needed...
python -c "import openai" 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Installing openai package...
pip install openai>=1.0.0
)
echo.
echo Step 5: Running Novita AI connection test...
python test_novita_connection.py
:end
echo.
echo Test complete!
pause
|