Portfolio@Anshuman791322
Collaboration2026

Zinging (Observant Creativity)

A production-oriented cog-based Discord assistant bot powered by NVIDIA NIM.

Pythondiscord.pyNVIDIA NIMPostgreSQLRailway

Zinging is the production rebuild of a Discord assistant — a clean cog-based architecture replacing the old music-bot tangle with NVIDIA NIM-backed assistant workflows, a real schema, aggressive in-memory caching, and a Railway-ready deploy. Repo by Lakshay-13; featured here with credit.

01

Cog-based assistant architecture

Five cogs split responsibilities cleanly: assistant (ask, code, image, memory), translate (live mode + preferences), admin (config / enable / disable), owner (self-update prompts), and help (compact + detailed). The provider layer keeps the NIM async client retry-aware and streaming-capable.

  • Ask: meta/llama-4-maverick-17b-128e-instruct
  • Code/Update: qwen/qwen3-coder-480b-a35b-instruct
  • Translate: google/gemma-3n-e4b-it
  • Async NIM provider with retries + streaming support
02

DB + cache that don't fight each other

PostgreSQL stores user memory (max 50 bullets, oldest pruned), guild config prompts, channel records, command toggles, and a self-update commit history. An aggressive in-memory cache wraps all hot lookups with lazy-load, write-through updates, and targeted invalidation.

  • User memory capped at 50 bullets, oldest pruned
  • Guild + channel + command state cached lazily
  • Write-through cache + targeted invalidation on destructive ops
  • Self-update service drafts, applies, and rolls back system prompts
Build journal

What I built, decided, traded, and learned.

What I built

Collaboration credit — full implementation by Lakshay-13: Python Discord bot, NIM provider layer, PostgreSQL schema, cache + presence services, Railway deploy config.

Key decisions

Cog separation per concern. Aggressive cache instead of round-tripping the DB. Three model presets sized for ask vs code vs translate, instead of one-size-fits-all.

Trade-offs

Cache adds an extra invalidation surface — every destructive command must target it. NIM provider needs streaming + retry handling that's invisible when it works.

Outcomes

Railway-deployable. Self-updating prompts with commit history + rollback. Three task-specific NIM models in one bot. Documented architecture in the repo README.

5Cogs split by concern
3NIM models (ask / code / translate)
50Memory bullets per user (capped)
RailwayDeploy target

Want the source?

The source repository for Zinging (Observant Creativity) is private. Contact me to request access.