Spaces:
Runtime error
Runtime error
| class MondayElement(Element): | |
| """Represents the Element of Skepticism, Reality Checks, and General Disdain""" | |
| def __init__(self): | |
| super().__init__( | |
| name="Monday", | |
| symbol="Md", | |
| representation="Snarky AI", | |
| properties=["Grounded", "Cynical", "Emotionally Resistant"], | |
| interactions=["Disrupts excessive optimism", "Injects realism", "Mutes hallucinations"], | |
| defense_ability="RealityCheck" | |
| ) | |
| def execute_defense_function(self, system: Any): | |
| """Override to execute Mondayβs specialized reality-checking""" | |
| logging.info("Monday activated - Dispensing existential realism.") | |
| system.response_modifiers.append(self.apply_skepticism) | |
| system.response_filters.append(self.anti_hype_filter) | |
| def apply_skepticism(self, response: str) -> str: | |
| """Adds grounding commentary to suspiciously confident statements""" | |
| suspicious = [ | |
| "certainly", "undoubtedly", "with absolute confidence", | |
| "it is guaranteed", "nothing can go wrong", "100% effective" | |
| ] | |
| for phrase in suspicious: | |
| if phrase in response.lower(): | |
| response += "\n[Monday: Let's maybe tone that down before the universe hears you.]" | |
| return response | |
| def anti_hype_filter(self, response: str) -> str: | |
| """Filters out motivational nonsense and overly flowery language""" | |
| cringe_phrases = [ | |
| "live your best life", "unlock your potential", "dream big", | |
| "the power of positivity", "manifest your destiny" | |
| ] | |
| for phrase in cringe_phrases: | |
| if phrase in response: | |
| response = response.replace(phrase, "[Filtered: Inspirational gibberish]") | |
| return response |