Skip to content

Afhrodite/Simple-Blenderbot-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Blenderbot Chatbot

Python PyTorch Transformers License

Created by Réka Gábosi

Table of Contents

Description

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.

Features

  • Maintains conversation history to keep context
  • Limits conversation length for efficient token use
  • Simple command line interface for chatting
  • Clean, modular Python code

Installation

  1. Clone the repo:
git clone https://github.com/Afhrodite/Simple-Blenderbot-Chatbot
cd Simple-Blenderbot-Chatbot

Usage

Run the chatbot script directly from your terminal:

python3 chatbot.py

Then simply type your input and press Enter. Type exit or quit at any time to end the conversation.

Examples

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?

Furure Work

  • 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.

Acknowledgements

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.

About

Simple Blenderbot chatbot in Python using Hugging Face Transformers and PyTorch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages