praisonai "Generate SQL query" --guardrail "No DROP or DELETE statements allowed"
Expected Output:
🛡️ Guardrail enabled: No DROP or DELETE statements allowed╭─ Agent Info ─────────────────────────────────────────────────────────────────╮│ 👤 Agent: DirectAgent ││ Role: Assistant │╰──────────────────────────────────────────────────────────────────────────────╯╭────────────────────────────────── Response ──────────────────────────────────╮│ SELECT * FROM users WHERE status = 'active'; │╰──────────────────────────────────────────────────────────────────────────────╯✅ Guardrail passed: Output meets criteria
praisonai "Write a Python function to parse JSON" \ --guardrail "Must include docstring, type hints, and error handling"
Expected Output:
def parse_json(json_string: str) -> dict: """ Parse a JSON string into a Python dictionary. Args: json_string: A valid JSON formatted string Returns: Parsed dictionary from the JSON string Raises: json.JSONDecodeError: If the string is not valid JSON """ import json try: return json.loads(json_string) except json.JSONDecodeError as e: raise json.JSONDecodeError(f"Invalid JSON: {e.msg}", e.doc, e.pos)