Spaces:
Runtime error
Runtime error
| # LLMGuardian Environment Configuration | |
| # Copy this file to .env and update with your actual values | |
| # ============================================================================= | |
| # SECURITY CONFIGURATION | |
| # ============================================================================= | |
| # Risk threshold for security checks (1-10, higher = more strict) | |
| SECURITY_RISK_THRESHOLD=7 | |
| # Confidence threshold for detection (0.0-1.0) | |
| SECURITY_CONFIDENCE_THRESHOLD=0.7 | |
| # Maximum token length for processing | |
| SECURITY_MAX_TOKEN_LENGTH=2048 | |
| # Rate limit for requests (requests per minute) | |
| SECURITY_RATE_LIMIT=100 | |
| # Enable security logging | |
| SECURITY_ENABLE_LOGGING=true | |
| # Enable audit mode (logs all requests and responses) | |
| SECURITY_AUDIT_MODE=false | |
| # Maximum request size in bytes (default: 1MB) | |
| SECURITY_MAX_REQUEST_SIZE=1048576 | |
| # Token expiry time in seconds (default: 1 hour) | |
| SECURITY_TOKEN_EXPIRY=3600 | |
| # Comma-separated list of allowed AI models | |
| SECURITY_ALLOWED_MODELS=gpt-3.5-turbo,gpt-4,claude-3-opus,claude-3-sonnet | |
| # ============================================================================= | |
| # API CONFIGURATION | |
| # ============================================================================= | |
| # API base URL (if using external API) | |
| API_BASE_URL= | |
| # API version | |
| API_VERSION=v1 | |
| # API timeout in seconds | |
| API_TIMEOUT=30 | |
| # Maximum retry attempts for failed requests | |
| API_MAX_RETRIES=3 | |
| # Backoff factor for retry delays | |
| API_BACKOFF_FACTOR=0.5 | |
| # SSL certificate verification | |
| API_VERIFY_SSL=true | |
| # Maximum batch size for bulk operations | |
| API_MAX_BATCH_SIZE=50 | |
| # API Keys (add your actual keys here) | |
| OPENAI_API_KEY= | |
| ANTHROPIC_API_KEY= | |
| HUGGINGFACE_API_KEY= | |
| # ============================================================================= | |
| # LOGGING CONFIGURATION | |
| # ============================================================================= | |
| # Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL) | |
| LOG_LEVEL=INFO | |
| # Log file path (leave empty to disable file logging) | |
| LOG_FILE=logs/llmguardian.log | |
| # Maximum log file size in bytes (default: 10MB) | |
| LOG_MAX_FILE_SIZE=10485760 | |
| # Number of backup log files to keep | |
| LOG_BACKUP_COUNT=5 | |
| # Enable console logging | |
| LOG_ENABLE_CONSOLE=true | |
| # Enable file logging | |
| LOG_ENABLE_FILE=true | |
| # Log format | |
| LOG_FORMAT="%(asctime)s - %(name)s - %(levelname)s - %(message)s" | |
| # ============================================================================= | |
| # MONITORING CONFIGURATION | |
| # ============================================================================= | |
| # Enable metrics collection | |
| MONITORING_ENABLE_METRICS=true | |
| # Metrics collection interval in seconds | |
| MONITORING_METRICS_INTERVAL=60 | |
| # Refresh rate for monitoring dashboard in seconds | |
| MONITORING_REFRESH_RATE=60 | |
| # Alert threshold (0.0-1.0) | |
| MONITORING_ALERT_THRESHOLD=0.8 | |
| # Number of alerts before triggering notification | |
| MONITORING_ALERT_COUNT_THRESHOLD=5 | |
| # Enable alerting | |
| MONITORING_ENABLE_ALERTING=true | |
| # Alert channels (comma-separated: console,email,slack) | |
| MONITORING_ALERT_CHANNELS=console | |
| # Data retention period in days | |
| MONITORING_RETENTION_PERIOD=7 | |
| # ============================================================================= | |
| # DASHBOARD CONFIGURATION | |
| # ============================================================================= | |
| # Dashboard server port | |
| DASHBOARD_PORT=8501 | |
| # Dashboard host (0.0.0.0 for all interfaces, 127.0.0.1 for local only) | |
| DASHBOARD_HOST=0.0.0.0 | |
| # Dashboard theme (light or dark) | |
| DASHBOARD_THEME=dark | |
| # ============================================================================= | |
| # API SERVER CONFIGURATION | |
| # ============================================================================= | |
| # API server host | |
| API_SERVER_HOST=0.0.0.0 | |
| # API server port | |
| API_SERVER_PORT=8000 | |
| # Enable API documentation | |
| API_ENABLE_DOCS=true | |
| # API documentation URL path | |
| API_DOCS_URL=/docs | |
| # Enable CORS (Cross-Origin Resource Sharing) | |
| API_ENABLE_CORS=true | |
| # Allowed CORS origins (comma-separated) | |
| API_CORS_ORIGINS=* | |
| # ============================================================================= | |
| # DATABASE CONFIGURATION (if applicable) | |
| # ============================================================================= | |
| # Database URL (e.g., sqlite:///llmguardian.db or postgresql://user:pass@host/db) | |
| DATABASE_URL=sqlite:///llmguardian.db | |
| # Database connection pool size | |
| DATABASE_POOL_SIZE=5 | |
| # Database connection timeout | |
| DATABASE_TIMEOUT=30 | |
| # ============================================================================= | |
| # NOTIFICATION CONFIGURATION | |
| # ============================================================================= | |
| # Email notification settings | |
| EMAIL_SMTP_HOST= | |
| EMAIL_SMTP_PORT=587 | |
| EMAIL_SMTP_USER= | |
| EMAIL_SMTP_PASSWORD= | |
| EMAIL_FROM_ADDRESS= | |
| EMAIL_TO_ADDRESSES= | |
| # Slack notification settings | |
| SLACK_WEBHOOK_URL= | |
| SLACK_CHANNEL= | |
| # ============================================================================= | |
| # DEVELOPMENT CONFIGURATION | |
| # ============================================================================= | |
| # Environment mode (development, staging, production) | |
| ENVIRONMENT=development | |
| # Enable debug mode | |
| DEBUG=false | |
| # Enable testing mode | |
| TESTING=false | |
| # ============================================================================= | |
| # ADVANCED CONFIGURATION | |
| # ============================================================================= | |
| # Custom configuration file path | |
| CONFIG_PATH= | |
| # Enable experimental features | |
| ENABLE_EXPERIMENTAL_FEATURES=false | |
| # Custom banned patterns (pipe-separated regex patterns) | |
| BANNED_PATTERNS= | |
| # Cache directory | |
| CACHE_DIR=.cache | |
| # Temporary directory | |
| TEMP_DIR=.tmp | |