An AI-driven Slack bot powered by Google Gemini and managed using uv, built for the CS 382 (Network Centric Computing) course to assist students with assignments, answer queries, and—when needed—deliver biting sarcasm to the forgetful.
.
├── assignment_material/ # Uploaded to Gemini for prompt context
│ ├── check.py
│ ├── DHT.py # Starter code
│ ├── PA4.pdf # Assignment manual
│ └── run_multiple_tests.py # Test cases
├── main.py # Slack app logic & async commands
├── utils.py # Prompt builders & Gemini helpers
├── pyproject.toml # Project config (for uv)
├── uv.lock # Lock file (managed by uv)
├── requirements.txt # Fallback for legacy pip usage
├── README.md
-
/helpProvides friendly, motivated guidance for students based on assignment materials. Prompt is constructed using:
PA4.pdf(manual)DHT.py(starter code)run_multiple_tests.py(tests)
-
/sarcasmDelivers sarcastic quips to students ignoring lectures or manuals. Uses CS 382–themed witty prompts.
-
/anonPosts a message anonymously and forwards it to
ADMIN_CHANNEL. -
/statAggregates and ranks user activity in a Slack channel (including replies).
Mentions with “help” or “sarcasm” trigger contextual responses using AI—grounded in thread history.
curl -Ls https://astral.sh/uv/install.sh | shOr:
cargo install uvuv venv
uv pip install .Create a .env file:
SLACK_BOT_TOKEN=your-bot-token
SLACK_APP_TOKEN=your-app-token
GEMINI_API_KEY=your-google-gemini-api-key/user types:
/help I'm confused about DHT.py
/bot responds:
Sounds like you’re diving into DHT! Focus on how nodes join the ring structure. Have you tried tracing the finger table setup using the starter code?
--
/user types:
/sarcasm I forgot the deadline, can I submit now?
/bot responds:
Of course, deadlines are just friendly suggestions… like seatbelts. Who needs 'em?