Public Access
Amélioration fonction RAG auto incrémentation
Build and Push Docker Image / build-and-push (push) Successful in 35s
Build and Push Docker Image / build-and-push (push) Successful in 35s
This commit is contained in:
1 parent
b88d693d69
commit
3b2cf51a24
2 files changed
+45
-4
No files matched your search
@@ -16,6 +16,7 @@ from modules.security import verifier_et_bloquer_vpn, journaliser_ip
|
||||
from modules.auth_manager import IDENTIFIANTS_ADMIN, verifier_mot_de_passe
|
||||
from modules.logger import log_event
|
||||
from modules.billing_manager import charger_soldes, sauvegarder_soldes
|
||||
from modules.rag_manager import auto_apprendre_rag
|
||||
|
||||
# Lancement du module d'auto-mise à jour en arrière-plan
|
||||
import modules.model_updater
|
||||
@@ -144,5 +145,12 @@ def post(cid: str):
|
||||
if cid_str in h: del h[cid_str]; save_history(h)
|
||||
return render_sidebar()
|
||||
|
||||
# --- NOUVELLE ROUTE POUR LE RAG (BOUTON MANUEL) ---
|
||||
@rt('/api/forcer_rag')
|
||||
def post(prompt: str, reponse: str, theme: str):
|
||||
"""Intercepte la demande manuelle, lance l'indexation et renvoie un badge vert."""
|
||||
auto_apprendre_rag(prompt, reponse, theme)
|
||||
return Span("✅ Indexé", cls="msg-action-btn", style="background-color: #4caf50; color: white; border: none; cursor: default;")
|
||||
|
||||
if __name__ == '__main__':
|
||||
serve(port=5001)
|
||||
Reference in new issue
Block a user