Ce repo est séparé en deux apps déployables indépendamment:
api-app/: FastAPI + WebSocket + Celery (métier)nlu-app/: service NLU auto-hébergé (compatiblePOST /model/parse)
Le moteur NLU actif est nlu-app/ (contrat v3).
cd nlu-app
scalingo --app chatbotsamir-nlu git-setup
# variables minimales
scalingo --app chatbotsamir-nlu env-set \
NLU_MODEL_PATH=models \
NLU_CONTRACT_VERSION=v3 \
NLU_MODEL_VERSION=2026-05-04-v3d \
NLU_LANGUAGE_PROFILE=fr_en_mixed \
INTENT_MIN_CONFIDENCE=0.45 \
INTENT_MIN_MARGIN=0.08 \
INTENT_TOPK=3 \
ENTITY_MIN_CONFIDENCE=0.00 \
NLU_CALIBRATION_ENABLED=true
# optionnel: sécuriser l'API NLU (compatible token Rasa)
scalingo --app chatbotsamir-nlu env-set RASA_AUTH_TOKEN=change-me
git push scalingo maincd api-app
scalingo --app chatbotsamir-api git-setup
scalingo --app chatbotsamir-api env-set \
SCALINGO_API_TOKEN=xxx \
REDIS_URL=redis://... \
RASA_URL=https://chatbotsamir-nlu.osc-fr1.scalingo.io \
RASA_TIMEOUT_MS=3000 \
RASA_AUTH_TOKEN=change-me \
NLU_EXPECTED_CONTRACT=v3 \
NLU_FALLBACK_ENABLE_REGEX=true \
NLU_CLARIFICATION_TOPK=3 \
WEB_CONCURRENCY=2 \
CELERY_CONCURRENCY=1 \
DEBUG=false
git push scalingo main
scalingo --app chatbotsamir-api scale worker:1- NLU:
GET /statusetPOST /model/parse - API:
/,/docs,/ws - End-to-end websocket + intents métiers
- Deployer
chatbotsamir-nluavec variablesNLU_*etINTENT_*. - Verifier
POST /model/parseavec headerX-NLU-Contract: v3. - Deployer
chatbotsamir-apiavecNLU_EXPECTED_CONTRACT=v3. - Verifier le handshake et les flows WebSocket.
- Retirer ensuite les anciennes hypothèses de payload legacy cote consommateurs.
Si besoin, remettre l'ancien moteur Rasa via:
RASA_URL=https://chatbotsamir-rasa....scalingo.io- redéployer
chatbotsamir-api