|
|
8 months ago | |
|---|---|---|
| agent_ai | 1 year ago | |
| migrations | 1 year ago | |
| src | 8 months ago | |
| tests | 8 months ago | |
| uploads | 1 year ago | |
| .dockerignore | 8 months ago | |
| .env | 1 year ago | |
| .env.example | 8 months ago | |
| .gitignore | 8 months ago | |
| Dockerfile | 8 months ago | |
| GUIDE_DEMARRAGE.md | 8 months ago | |
| README.md | 8 months ago | |
| VLM.py | 1 year ago | |
| __init__.py | 1 year ago | |
| config.py | 8 months ago | |
| docker-compose.yml | 8 months ago | |
| index.html | 1 year ago | |
| install_local.ps1 | 8 months ago | |
| ocr.py | 1 year ago | |
| page_hashes.json | 1 year ago | |
| processing.py | 1 year ago | |
| requirements.txt | 8 months ago | |
| run_local.ps1 | 8 months ago | |
| setup_venv.ps1 | 8 months ago | |
| wsgi.py | 1 year ago |
Application Flask de chatbot avec RAG (Retrieval-Augmented Generation), indexation FAISS et LLM Scaleway.
.env avec les variables nécessaires (voir .env.example)# 1. Copier le fichier d'environnement
cp .env.example .env
# Éditer .env et remplir : WIKI_USERNAME, WIKI_PASSWORD, SCW_API_KEY, SERPAPI_KEY (optionnel)
# 2. Lancer tous les services (app, PostgreSQL)
docker-compose up --build
L'application sera accessible sur http://localhost:5000
# 1. Créer et activer le venv
py -m venv venv
.\venv\Scripts\Activate.ps1
# 2. Installer les dépendances (OBLIGATOIRE - évite ModuleNotFoundError)
.\install_local.ps1
# Si erreur psycopg2 (Python 3.13 Windows): .\install_local.ps1 -SkipPsycopg
# Alternative: pip install -r requirements.txt
# 3. PostgreSQL doit tourner (ex: docker-compose up -d postgres)
# 4. Lancer l'app
.\run_local.ps1
docker build -t chatbot .
docker run -d --name conteneur -p 5000:5000 -e DATABASE_URL=postgresql://... chatbot
Au premier démarrage, les fichiers All_chunks.json et faiss_index.index peuvent être absents. Pour les générer :
# Dans un conteneur ou en local avec venv activé
python -c "
from src.utils.processing import full_update_pipeline
full_update_pipeline()
"
Les dépendances (dont pytest) sont installées dans l'image Docker. Pour lancer les tests :
docker-compose run --rm app pytest tests/ -v
Ou après docker-compose up :
docker-compose exec app pytest tests/ -v
docker psdocker stop <nom-conteneur>docker rm <nom-conteneur>docker save chatbot > chatbot.tardocker load < chatbot.tar