feat(perception): integrate VLM visual ad detection into resonance vibe check to block obfuscated ads
This commit is contained in:
@@ -66,6 +66,12 @@ class ResonanceEvaluatorPlugin(BehaviorPlugin):
|
||||
"✨ [Resonance] VLM vibe check returned None (truncated JSON?). Keeping neutral score."
|
||||
)
|
||||
else:
|
||||
if vibe.get("is_ad"):
|
||||
logger.info("🛡️ [Resonance Oracle] Visually identified post as an Ad! Skipping...")
|
||||
from GramAddict.core.utils import humanized_scroll
|
||||
humanized_scroll(ctx.device)
|
||||
return BehaviorResult(executed=True, should_skip=True)
|
||||
|
||||
# BUG 6 Fix: VLM returns {"should_like": true/false}, not "quality_score"
|
||||
should_like = vibe.get("should_like", False)
|
||||
vibe_score = 1.0 if should_like else 0.2
|
||||
|
||||
@@ -117,11 +117,13 @@ class SemanticEvaluator:
|
||||
You are a user with the following interests: {', '.join(persona_interests)}.
|
||||
You are looking at an Instagram post.
|
||||
Evaluate if this post is highly relevant to your interests and if you should like/comment on it.
|
||||
CRITICAL: Check if this post is an advertisement or sponsored content (look for "Sponsored", "Ad", or promotional product placement).
|
||||
|
||||
Reply ONLY in valid JSON format:
|
||||
{{
|
||||
"should_like": true/false,
|
||||
"should_comment": true/false,
|
||||
"is_ad": true/false,
|
||||
"reasoning": "brief explanation"
|
||||
}}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user