Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /