xinli/Archive/启动RAG服务.bat
2026-01-30 16:23:31 +08:00

39 lines
940 B
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo ========================================
echo 启动RAG服务
echo ========================================
echo.
echo [1/2] 检查Ollama...
curl -s http://localhost:11434/api/tags >nul 2>&1
if %errorlevel% equ 0 (
echo ✓ Ollama已在运行
) else (
echo ✗ Ollama未运行尝试启动...
echo 如果失败请手动启动Ollama应用
)
echo.
echo [2/2] 启动ChromaDB...
curl -s http://localhost:8000/api/v1/heartbeat >nul 2>&1
if %errorlevel% equ 0 (
echo ✓ ChromaDB已在运行
) else (
echo 正在启动ChromaDB服务...
start "ChromaDB" cmd /k "chroma run --host localhost --port 8000"
echo ✓ ChromaDB启动命令已执行
echo 新窗口将显示ChromaDB日志
timeout /t 3 >nul
)
echo.
echo ========================================
echo.
echo 等待服务启动...
timeout /t 5 >nul
echo.
echo 验证服务状态...
call 检查RAG服务状态.bat