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)

Project 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 Challenge

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.

Technology Stack

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

Key Features

OpenAI API integration

Floating widget UI with knowledge base

Markdown support and chat history handling

Business Impact

Enabled interactive onboarding and storytelling

Offered a reusable template for AI-enhanced web UX

Technical Achievements

Published as a PyPI package with clean setup

Useful as both a teaching tool and real product

Future Enhancements

Add persistence via user sessions or Firebase

Enable audio output with text-to-speech

Technical Implementation

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

Interested in This Project?

View the source code or see it in action