diff options
| author | Fuwn <[email protected]> | 2025-09-17 20:12:45 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-17 20:12:45 -0700 |
| commit | bbe6e5457c452c575bad91376299536c7ed9d20c (patch) | |
| tree | 3079d2405b31a7c358e1d08d44a47b585d639339 | |
| parent | feat(intelligent_moderator): Include Discord server invite when marking as lo... (diff) | |
| download | umabot-bbe6e5457c452c575bad91376299536c7ed9d20c.tar.xz umabot-bbe6e5457c452c575bad91376299536c7ed9d20c.zip | |
feat(intelligent_moderator): Update response grammar
| -rw-r--r-- | TEST_MODERATOR_README.md | 4 | ||||
| -rw-r--r-- | src/umabot/rules/intelligent_moderator_base.py | 4 | ||||
| -rw-r--r-- | src/umabot/rules/intelligent_roleplay_moderator.py | 14 | ||||
| -rwxr-xr-x | test_moderator.py | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/TEST_MODERATOR_README.md b/TEST_MODERATOR_README.md index c2eb94c..bfde61f 100644 --- a/TEST_MODERATOR_README.md +++ b/TEST_MODERATOR_README.md @@ -76,14 +76,14 @@ The `test_posts/` directory contains sample files demonstrating different types The tool shows: - **Should be Art**: Whether the post should be re-flaired as Art -- **Is Low Effort**: Whether the post should be removed for low effort +- **Is Low Effort**: Whether the post should be removed for low-effort - **Confidence**: AI confidence score (0.0 to 1.0) - **Reasoning**: Detailed explanation of the AI's decision ### Actions - **šØ Change flair to Art**: Post will be re-flaired and user notified -- **šļø Remove post (low effort)**: Post will be removed and user notified +- **šļø Remove post (low-effort)**: Post will be removed and user notified - **ā
Allow post**: Post passes all checks and will be allowed ### Mod Mail Preview diff --git a/src/umabot/rules/intelligent_moderator_base.py b/src/umabot/rules/intelligent_moderator_base.py index 3eddd1b..56035e8 100644 --- a/src/umabot/rules/intelligent_moderator_base.py +++ b/src/umabot/rules/intelligent_moderator_base.py @@ -33,7 +33,7 @@ For each post, respond with a JSON object containing: Guidelines: - A post should be flaired as "Art" if it's primarily showcasing artwork, images, or visual content with minimal roleplay text -- A post is "low effort" if it lacks substance, creativity, or meaningful roleplay content +- A post is "low-effort" if it lacks substance, creativity, or meaningful roleplay content - Consider factors like: word count, creativity, effort, engagement potential, originality - Be strict but fair - err on the side of allowing content unless it's clearly low quality - High confidence (0.8+) for clear cases, lower confidence for borderline cases @@ -173,7 +173,7 @@ Word Count: {word_count} # Change flair to Art and notify user (priority over removal) actions.append("CHANGE_FLAIR_TO_ART") elif evaluation["is_low_effort"]: - # Remove low effort post and notify user + # Remove low-effort post and notify user actions.append("REMOVE_POST") else: # Post is good quality roleplay - allow it diff --git a/src/umabot/rules/intelligent_roleplay_moderator.py b/src/umabot/rules/intelligent_roleplay_moderator.py index 4c00cb2..a81ea88 100644 --- a/src/umabot/rules/intelligent_roleplay_moderator.py +++ b/src/umabot/rules/intelligent_roleplay_moderator.py @@ -34,7 +34,7 @@ class IntelligentRoleplayModerator(Rule, IntelligentModeratorBase): return False # Don't remove, just change flair elif evaluation["is_low_effort"]: - # Remove low effort post and notify user + # Remove low-effort post and notify user self._notify_low_effort_removal(submission, evaluation) return True # Remove the post @@ -46,7 +46,7 @@ class IntelligentRoleplayModerator(Rule, IntelligentModeratorBase): return False # Don't remove on error def get_removal_message(self, submission: praw.models.Submission) -> str: - """Get removal message for low effort posts.""" + """Get removal message for low-effort posts.""" return "" # We send mod mail instead of commenting # Abstract method implementations for IntelligentModeratorBase @@ -133,10 +133,10 @@ Thank you for understanding!""" self.logger.error(f"Error sending art flair notification for {submission.id}: {e}") def _notify_low_effort_removal(self, submission: praw.models.Submission, evaluation: dict) -> None: - """Send mod mail about low effort removal.""" + """Send mod mail about low-effort removal.""" try: username = submission.author.name - subject = "Your roleplay post has been removed for low effort" + subject = "Your roleplay post has been removed for low-effort" # Format reasoning based on configuration formatted_reasoning = self._format_reasoning(evaluation) @@ -166,10 +166,10 @@ If you believe this was done in error, please contact the moderators via Mod Mai Thank you for understanding!""" submission.author.message(subject, message) - self.logger.info(f"Sent low effort removal notification to {username}") + self.logger.info(f"Sent low-effort removal notification to {username}") except Exception as e: - self.logger.error(f"Error sending low effort notification for {submission.id}: {e}") + self.logger.error(f"Error sending low-effort notification for {submission.id}: {e}") def _format_reasoning(self, evaluation: dict, is_art_flair_change: bool = False) -> str: """Format reasoning based on the configured reasoning level.""" @@ -208,7 +208,7 @@ Thank you for understanding!""" issues.append('no plot development') if any(word in reasoning_lower for word in ['effort', 'substance', 'content']): if 'low' in reasoning_lower or 'lack' in reasoning_lower: - issues.append('low effort') + issues.append('low-effort') if any(word in reasoning_lower for word in ['creativity', 'originality']): if 'lack' in reasoning_lower or 'no' in reasoning_lower: issues.append('lacks creativity') diff --git a/test_moderator.py b/test_moderator.py index 061adda..939d214 100755 --- a/test_moderator.py +++ b/test_moderator.py @@ -286,7 +286,7 @@ class TestIntelligentModerator(IntelligentModeratorBase): issues.append('no plot development') if any(word in reasoning_lower for word in ['effort', 'substance', 'content']): if 'low' in reasoning_lower or 'lack' in reasoning_lower: - issues.append('low effort') + issues.append('low-effort') if any(word in reasoning_lower for word in ['creativity', 'originality']): if 'lack' in reasoning_lower or 'no' in reasoning_lower: issues.append('lacks creativity') @@ -378,7 +378,7 @@ def print_results(results: List[Dict[str, Any]], pause: bool = False, moderator: if action == "CHANGE_FLAIR_TO_ART": print(" šØ Change flair to Art") elif action == "REMOVE_POST": - print(" šļø Remove post (low effort)") + print(" šļø Remove post (low-effort)") elif action == "ALLOW_POST": print(" ā
Allow post") @@ -399,8 +399,8 @@ def print_results(results: List[Dict[str, Any]], pause: bool = False, moderator: if "REMOVE_POST" in actions: print(f"\nš§ Mod Mail (Low Effort Removal):") - print(f" Subject: Your roleplay post has been removed for low effort") - print(f" Message: Your roleplay post has been removed because it was determined to be low effort content.") + print(f" Subject: Your roleplay post has been removed for low-effort") + print(f" Message: Your roleplay post has been removed because it was determined to be low-effort content.") # Format reasoning based on moderator's reasoning level if moderator: |