Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 934 Bytes

File metadata and controls

32 lines (23 loc) · 934 Bytes

Rule-Based Chatbot (Python)

A simple rule-based chatbot built using Python's if-elif-else logic and keyword matching.
The bot responds to greetings, questions about its name, well-being, and can exit gracefully when prompted.


Features

  • Keyword detection: Understands variations of user input without exact matching.
  • Randomized responses: Chooses different replies for a more natural conversation.
  • Graceful exit: Detects "bye", "quit", "exit", etc., and ends the chat politely.
  • Easy to customize: Add new keywords and responses in the responses dictionary.

Requirements

  • Python 3.x
    (No external libraries required — works out of the box)

Installation & Setup

  1. Clone or download this repository.
  2. Save the chatbot script as chatbot.py.

How to Run

  1. Open a terminal or VS Code.
  2. Navigate to the script’s folder:
    cd path/to/your/folder