How lislema/nvidia-guardrails works
This is a Streamlit IT incident-management chatbot protected by a FastAPI/NeMo Guardrails service. Users can test a message through classification alone or submit an incident form for classification and an AI support response. The documented checks include jailbreak detection, semantic IT classification, and a keyword fallback. The excerpts show the service loading Colang rails and the UI making HTTP requests; details of some API-stage implementations are omitted, so the graph relies on documented relationships for those stages.
Main entry points: main.py Incident check endpoint · app.py Streamlit app · incident_rails.co Colang rails · config.yaml Language policy config
Components 13
User interface
- Streamlit app
streamlit/app.py - Translated labels
streamlit/labels
Guardrails service
- Classify endpoint
config/main.py - Incident check endpoint
config/main.py
Policy and rails
- Jailbreak detection
config/main.py - Semantic classification
config/main.py - Keyword fallback
config/main.py - Language policy config
config/config.yaml - Colang rails
rails/incident_rails.co - Incident actions
config/actions.py
AI response
- IT support response
config/main.py
Other components
- Incident reporter
- LLM provider
Connections 16
- Incident reporter → Streamlit app: submits message
README.md - Streamlit app → Translated labels: loads labels
streamlit/app.py - Streamlit app → Classify endpoint: POST /classify
README.md - Streamlit app → Incident check endpoint: POST /check
README.md - Incident check endpoint → Jailbreak detection: checks jailbreak
config/main.py - Classify endpoint → Jailbreak detection: checks jailbreak
config/main.py - Incident check endpoint → Semantic classification: classifies message
README.md - Classify endpoint → Semantic classification: classifies message
config/main.py - Classify endpoint → Keyword fallback: falls back
config/main.py - Incident check endpoint → Keyword fallback: checks keywords
README.md - Jailbreak detection → Language policy config: uses patterns
README.md - Keyword fallback → Language policy config: uses keywords
README.md - Incident check endpoint → IT support response: generates response
README.md - IT support response → LLM provider: requests completion
README.md - Incident check endpoint → Colang rails: loads flows
config/main.py - Colang rails → Incident actions: may invoke