Built the Thought Police module for my 1984 themed Slack bot
Added a Thought Police module that watches messages in a specific channel, scores their sentiment using HuggingFace’s RoBERTa model, and fires a Big Brother-themed response if the message is negative or positive enough. The bot replies in-thread which feels way more unsettling than posting standalone, like it’s whispering directly at you.
Hit a bunch of friction getting here though. The Perspective API I originally planned to use got sunset, then the HuggingFace inference endpoint URL changed mid-build and started returning ENOTFOUND, turned out the old api-inference.huggingface.co domain was dead and needed to be swapped to router.huggingface.co. Then the response labels came back lowercase (negative instead of Negative) which broke the score parsing silently, the bot was running but returning undefined for everything.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.