mirror of
https://github.com/Ladebeze66/llm_lab_perso.git
synced 2025-12-13 09:06:50 +01:00
79 lines
2.0 KiB
Batchfile
79 lines
2.0 KiB
Batchfile
@echo off
|
|
setlocal
|
|
|
|
REM Script pour exécuter les commandes dans l'environnement virtuel LLM Lab
|
|
|
|
REM Vérification si l'environnement virtuel existe
|
|
if not exist "llmlab" (
|
|
echo L'environnement virtuel n'existe pas. Veuillez exécuter setup_env.bat pour le créer.
|
|
exit /b 1
|
|
)
|
|
|
|
REM Activation de l'environnement virtuel
|
|
call llmlab\Scripts\activate.bat
|
|
|
|
REM Vérifier le premier argument
|
|
if "%1"=="" goto :help
|
|
if "%1"=="help" goto :help
|
|
if "%1"=="chat" goto :chat
|
|
if "%1"=="gui" goto :gui
|
|
if "%1"=="monitor" goto :monitor
|
|
if "%1"=="list" goto :list
|
|
if "%1"=="test" goto :test
|
|
if "%1"=="api" goto :api
|
|
echo Commande inconnue: %1
|
|
goto :help
|
|
|
|
:chat
|
|
if "%2"=="" (
|
|
python chat.py --list
|
|
) else (
|
|
python chat.py "%2"
|
|
)
|
|
goto :end
|
|
|
|
:gui
|
|
python chat_gui.py
|
|
goto :end
|
|
|
|
:monitor
|
|
python monitor.py
|
|
goto :end
|
|
|
|
:list
|
|
python chat.py --list
|
|
goto :end
|
|
|
|
:test
|
|
python -m unittest discover tests
|
|
goto :end
|
|
|
|
:api
|
|
echo Démarrage du serveur API sur http://localhost:8000...
|
|
echo Appuyez sur Ctrl+C pour arrêter le serveur.
|
|
python api_server.py
|
|
goto :end
|
|
|
|
:help
|
|
echo Usage: run.bat [commande] [arguments...]
|
|
echo.
|
|
echo Commandes disponibles:
|
|
echo chat [agent] Lance le chat en ligne de commande avec l'agent spécifié
|
|
echo gui Lance l'interface graphique de chat
|
|
echo monitor Lance le moniteur système
|
|
echo list Liste les agents disponibles
|
|
echo test Exécute les tests unitaires
|
|
echo api Lance le serveur API pour l'intégration avec Cursor/Obsidian
|
|
echo help Affiche cette aide
|
|
echo.
|
|
echo Exemples:
|
|
echo run.bat chat cursor Lance le chat en ligne de commande avec l'agent Cursor (CodeLlama)
|
|
echo run.bat gui Lance l'interface graphique de chat
|
|
echo run.bat monitor Lance le moniteur système
|
|
echo run.bat list Liste tous les agents disponibles
|
|
echo run.bat api Lance le serveur API sur le port 8000
|
|
goto :end
|
|
|
|
:end
|
|
call llmlab\Scripts\deactivate.bat
|
|
endlocal |