Created by Réka Gábosi
A simple conversational AI chatbot powered by Facebook's BlenderBot 400M distilled model using HuggingFace Transformers.
This project was originally created as part of the IBM's Building Generative AI-Powered Applications with Python (Module 2) course. It has been enhanced beyond the base module example by improving the conversational memory handling, making the code cleaner and more robust, and adding better user experience elements such as persistent history and graceful exit.
- Maintains conversation history to keep context
- Limits conversation length for efficient token use
- Simple command line interface for chatting
- Clean, modular Python code
- Clone the repo:
git clone https://github.com/Afhrodite/Simple-Blenderbot-Chatbot
cd Simple-Blenderbot-ChatbotRun the chatbot script directly from your terminal:
python3 chatbot.pyThen simply type your input and press Enter.
Type exit or quit at any time to end the conversation.
hello, how are you doing?
Bot: I am doing well, thank you. How are you this fine evening?
I'm a bit tired, been coding all day.
Bot: I understand. Coding can be exhausting, but also rewarding. What are you working on?
I'm building an AI chatbot, actually.
Bot: That sounds exciting! What technology are you using for your chatbot?
- Add persistent conversation history saved to file (so it remembers across sessions).
- Build a simple web UI with Gradio or Streamlit.
- Option to switch between different models (e.g., Blenderbot 3B vs 400M).
- Implement message truncation for very long histories to avoid hitting max tokens.
This project was developed as part of the IBM course: Building Generative AI-Powered Applications with Python, provided on Coursera.
Special thanks to:
- IBM Skills Network for providing the course framework and inspiration for this project.