How kodigitaccount/llm-guardrails_-enterprise-ai_-responsible-ai works
This repository is a small web workshop demonstrating prompt guardrails around LLM generation. A user submits a prompt through the browser; the FastAPI endpoint validates it, calls the model integration, checks the generated text, and returns either a block or a safe response for display. The source index shows the model module is referenced but absent from the supplied tree, so it is represented as an external integration. The template and stylesheet are present in the tree, but their contents were not sampled.
Main entry points: app.py FastAPI application · script.js Browser interaction · index.html Workshop page · guardrails.py Input checks
Components 8
Web interface
- Workshop page
templates/index.html - Browser interaction
static/script.js - Page styling
static/style.css
Guardrail runtime
- FastAPI application
app.py - Input checks
guardrails.py - Gemini generation
- Output checks
output_guardrails.py
Other components
- User
Connections 7
- User → Workshop page: uses
- FastAPI application → Workshop page: renders
app.py - Browser interaction → FastAPI application: posts prompt
static/script.js - FastAPI application → Input checks: checks input
app.py - FastAPI application → Gemini generation: generates response
app.py - FastAPI application → Output checks: checks output
app.py - Browser interaction → User: displays result
static/script.js