Site Icon Matthew Raynor
← Back to Portfolio

AI Chat Widget (Open Source)

A pip-installable Django package that adds a floating OpenAI-powered chat widget to any site.

AI Chat Widget (Open Source)

📌 Overview

Built for storytelling and onboarding, this widget is fully open-source, customizable, and bundled with Twine for PyPI distribution. It's designed to help others create AI-enhanced web experiences.

🧩 The Problem

I needed an easy way to share my story and resources interactively through an AI assistant embedded on my site.

💡 The Solution

Created a floating chat widget backed by OpenAI, styled with Bootstrap, and deployed via PyPI as a reusable Django app.

🛠️ Tech Stack

Backend:
Django Python OpenAI SDK Docker
Frontend:
Bootstrap 5 JavaScript
Deployment:
Heroku Docker
Tools:
Twine Markdown JSON knowledge base

✨ Special Features

  • 🌟 OpenAI API integration
  • 🌟 Floating widget UI with knowledge base
  • 🌟 Markdown support and chat history handling

🎯 Real-World Problems Solved

  • 🔧 Enabled interactive onboarding and storytelling
  • 🔧 Offered a reusable template for AI-enhanced web UX

🚧 Improvements for Next Time

  • 🛠 Add persistence via user sessions or Firebase
  • 🛠 Enable audio output with text-to-speech

🏅 What I'm Proud Of

  • 🌈 Published as a PyPI package with clean setup
  • 🌈 Useful as both a teaching tool and real product

📚 Build Notes

Packaged with twine, includes JSON knowledge base ingestion and OpenAI GPT integration. Currently being tested in multiple live environments.