Skip to content

samyakjainx/CodeAlpha_Basic_Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 CodeAlpha Basic Chatbot

Python Status License CodeAlpha Open Source

A simple yet interactive rule-based chatbot built with Python that simulates basic human conversations using predefined responses and demonstrates core programming concepts such as functions, loops, dictionaries, and conditional statements.


📖 Project Overview

The Basic Chatbot is a command-line conversational assistant developed as part of the CodeAlpha Python Programming Internship.

The chatbot interacts with users by recognizing predefined inputs and providing appropriate responses. It demonstrates the fundamentals of chatbot development while focusing on clean code, modular design, and user-friendly interaction.

This project showcases practical implementation of:

  • Functions
  • Dictionaries
  • Conditional Statements
  • Loops
  • User Input Handling
  • Rule-Based Conversation Logic

✨ Features

✅ Interactive command-line chatbot

✅ Predefined intelligent responses

✅ User-friendly conversation flow

✅ Help command support

✅ Graceful exit functionality

✅ Input normalization

✅ Clean and modular code structure


🛠️ Technologies Used

Technology Purpose
Python Core Programming Language
Functions Modular Programming
Dictionary Response Mapping
Loops Continuous Conversation
Conditional Statements Decision Making
CLI User Interaction

📂 Project Structure

CodeAlpha_Basic_Chatbot/

│
├── basic_chatbot.py
├── README.md
├── LICENSE
├── requirements.txt
├── .gitignore
│
├── screenshots/
│   ├── code.png
│   ├── welcome.png
│   ├── conversation.png 
│   └── exit.png
│
└── assets/
    └── demo.gif

🚀 Getting Started

Clone the Repository

git clone https://github.com/samyakjainx/CodeAlpha_Basic_Chatbot.git

Navigate to the Project Folder

cd CodeAlpha_Basic_Chatbot

Run the Program

python basic_chatbot.py

💻 Usage

Start the chatbot:

==============================================
WELCOME TO ALPHABOT

Type 'bye' or 'goodbye' to exit

==============================================

Try interacting with the chatbot using:

hello

hi

how are you

what is your name

help

bye

💬 Sample Conversation

==================================================

WELCOME TO ALPHABOT

Type 'bye' or 'goodbye' to exit the chat.

==================================================

You: hello

AlphaBot:
Hi there! How can I help you today?

--------------------------------------------------

You: what is your name

AlphaBot:
I am AlphaBot, your friendly neighborhood rule-based assistant.

--------------------------------------------------

You: how are you

AlphaBot:
I'm just a bundle of code, but I'm running perfectly! How are you?

--------------------------------------------------

You: help

AlphaBot:
I can chat with you! Try saying 'hello', 'how are you', or 'what is your name'.

--------------------------------------------------

You: bye

AlphaBot:
Goodbye! Have a wonderful day ahead!

==================================================

Chat session ended.

📸 Screenshots

Source code

code
screenshots/code.png

Welcome Screen

welcome
screenshots/welcome.png

Conversation Example

conversation
screenshots/conversation.png

Exit Screen

exit
screenshots/exit.png

🎥 Demo

demo
assets/demo.gif

🎯 Learning Outcomes

This project helped in understanding:

  • Python Functions

  • Dictionary Data Structures

  • Rule-Based Chatbot Logic

  • Conditional Statements

  • Loops

  • User Input Processing

  • Command-Line Application Development

  • Modular Programming


🔮 Future Improvements

Some exciting features that can be added in future versions:

  • 🤖 AI-powered conversations

  • 🎤 Voice input and speech recognition

  • 🌍 Multi-language support

  • 💾 Chat history storage

  • 😊 Sentiment analysis

  • 🧠 Context-aware responses

  • 🌐 Web interface using Flask

  • 📱 GUI version using Tkinter


🤝 Contributing

Contributions are welcome!

If you'd like to improve this project:

  1. Fork the repository

  2. Create a new branch

  3. Make your changes

  4. Commit your changes

  5. Open a Pull Request


👨‍💻 Author

Samyak Jain

AI & ML Enthusiast | Python Developer | Open Source Learner

GitHub: https://github.com/samyakjainx/

LinkedIn: https://www.linkedin.com/in/samyakjain-ai/


📜 License

This project is licensed under the MIT License.

You are free to use, modify, and distribute this project for educational purposes.


⭐ Support

If you found this project helpful, consider giving it a ⭐ Star on GitHub.

It motivates me to build and share more open-source projects.


Made with ❤️ using Python

About

A rule-based chatbot built with Python that simulates natural conversations using predefined responses, demonstrating functions, conditional logic, loops, and user interaction through a clean command-line interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages