Bench AI Assistant
AI-powered video discovery chat assistant WordPress plugin
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/shanthosh-babu-r/ai-assistant/archive/refs/heads/main.zipBench AI Assistant - WordPress Plugin
An AI-powered video discovery chat assistant built as a custom WordPress plugin for MyPromoVideos.
Live Demo: https://mypromovideos.com/video-inspirations/
What It Does
Users type a natural language prompt (e.g. "I need a fintech explainer video") and the assistant finds and displays the most relevant B2B marketing videos from a library of 200+ videos.
Features
- Conversational chat UI built entirely in Vanilla JS (no React or Vue)
- AI intent extraction via OpenAI GPT-4 (fallback: Google Gemini)
- Video search using WordPress WP_Query on a custom post type (
ulz_listing) - Progressive fallback search strategy (AND to OR to keyword)
- Duplicate video removal (PHP + JS deduplication by ID and title)
- Email gate: shows 3 videos first, captures email, then 9 per batch
- Real-time lead logging to Google Sheets via Google Apps Script webhook
- Every user search prompt logged to Sheets instantly (fire and forget)
- Email backfilled into all matching session rows on submission
- Mobile-first email form with
touchendevent handling - Session state persistence: email collected flag survives topic changes
- Animated "More Videos" bar on landing page
- Cache busting via WordPress version constant
Tech Stack
| Layer | Technology |
|---|---|
| Backend | PHP 8, WordPress REST API |
| AI | OpenAI GPT-4, Google Gemini |
| Database | WordPress WP_Query (custom CPT) |
| Frontend | Vanilla JavaScript, CSS3 |
| Lead Capture | Google Apps Script, Google Sheets |
| Hosting | Hostinger, Cloudflare CDN |
Plugin Structure
bench-ai-assistant/
├── bench-ai-assistant.php # Plugin entry point
├── assets/
│ ├── js/bench-ai-chat.js # All frontend logic
│ └── css/bench-ai-chat.css # Styles
├── includes/
│ ├── class-rest-api.php # API endpoints
│ ├── class-search-handler.php # WP_Query search logic
│ ├── class-openai-client.php # GPT integration
│ ├── class-gemini-client.php # Gemini integration
│ ├── class-plugin.php # Plugin bootstrap
│ └── class-rate-limiter.php # Rate limiting
└── templates/
└── chat-hero.php # Landing + chat UI template
How It Works
- User types a prompt to WordPress REST API (
/bench-ai/v1/chat) - AI extracts intent: keywords, tags, categories
WP_Querysearchesulz_listingCPT with progressive fallback- AI re-ranks results by relevance
- First 3 videos shown, email gate appears, then 9 per batch after
- Search prompts and emails logged to Google Sheets in real time
Live Site
mypromovideos.com/video-inspirations/
Built during internship at MyPromoVideos - May 2026