Full Stack Python AI Chatbot
Build your own AI Chatbot with pure Python
The Tech Stack
- Python 3.11 (or up)
- Reflex
- OpenAI gpt-4o-mini (or latest)
- Serverless PostgreSQL via Neon
- Virtual Machine for deployment via Linode
References
- Code is on our GitHub
- Check out the deploy Reflex with Neon blog post
Lessons
Welcome
2:02
Demo
3:18
Python Environment and Reflex App Setup
3:28
VSCode + Git
1:44
New Page and URL Routing
4:06
A Component for Layout
4:01
Simplify App Structure
4:51
Reflex Docs Recipes
4:53
Identify Rendered Components in HTML
5:32
Navigation Links & Routes
3:48
Handling Click Events with Reflex State
5:18
Chat Component and Routing
3:00
Creating a Form
5:53
Conditionally Render Success Message
3:39
Timeout Delays with Reflex State
2:01
Storing Chat Messages in Memory
4:01
Render the Chat Messages
6:34
Adding Intelligence to our Bot with OpenAI
13:03
Integrate Reflex with Neon Postgres
4:36
Creating a Database Table with Reflex
8:33
Your First Database Migration
6:55
Adding Data into the Database
3:51
Neon Branching for Major Database Migrations
5:34
Related Database Table Model
7:12
Create DB-stored Chat Sessions
7:44
Storing Chat Messages on Neon
6:34
Button for New Chat
3:17
Handling Dynamic URL Routes
6:35
Load Stored Chat Session from Database
6:43
Loading Chat Session Messages from Database
4:18
Resetting Reflex State Values
7:03
Adding the Dockerfile
8:15
Build & Push Docker Containers with GitHub Actions
17:20
Using One-Off SSH Keys for Virtual Machines
14:26
Deploy Reflex with Docker Compose, Ansible, and GitHub Actions
18:37
Thank you and next steps
1:04