Guardrails Moderator is a SaaS solution designed to moderate user inputs, ensuring compliance and security by filtering PII (Personally Identifiable Information) and unwanted words using AI and Regex.
Censor inappropriate words with customizable filters
Detect and mask PII
Choose between Regex-based filtering (fast) or AI-powered moderation (context-aware)
REST API for seamless integration into any application
Real-time text validation with flexible moderation settings
# Install dependencies
pip install -r requirements.txtSend a POST request to validate text:
curl -X POST "http://localhost:8000/validate/" -H "Content-Type: application/json" -d '{"text": "My email is test@example.com", "use_ai": false}'{
"original": "My email is test@example.com",
"censored": "My email is ****"
}This project is licensed under the MIT License - see the LICENSE file for details.
Pull requests are welcome! Feel free to open an issue or suggest improvements.
- API concepts
- start API using (FastAPI framework)
- Use FastAPI interface to call app.py to test params calls
- Develop logic (Start simple like "if guardrails receive an prohibited pre-defined word, return to API user input censored")