Welcome to the Advanced Chatbot project! This chatbot, written in Python, offers a fun and interactive command-line experience. It's designed to showcase basic conversational abilities and demonstrate how Python can handle simple AI tasks.
This Python chatbot can respond to a variety of user inputs, providing a simple yet engaging interactive experience. With support for emojis, it makes conversations more lively and enjoyable. Perfect for learning about chatbot logic and Python programming!
- Interactive Conversations: Responds to various user inputs with engaging replies.
- Date and Time: Provides current date and time.
- Emoji Integration: Uses emojis to make interactions more expressive and fun.
- Customizable: Easily extendable with additional queries and responses.
Before you begin, ensure you have:
- Python 3.x: The script is compatible with Python 3.x. Download and install it from Python's official website.
emoji
Library: Install it using pip for emoji support.pip install emoji
Follow these steps to get the chatbot running on your machine:
-
Clone the Repository:
git clone https://github.com/mdriyadkhan585/Chatbot-Python.git
-
Navigate to the Project Directory:
cd Chatbot-Python
-
Install Dependencies:
pip install emoji
Run the chatbot script using Python to start interacting:
python chatbot.py
- Greet the Bot: Type
hello
and press Enter. - Ask How the Bot Is: Type
how are you
. - Ask for Its Name: Type
what's your name
. - Inquire About Its Abilities: Type
what can you do
. - Request the Time: Type
what's the time
. - Request the Date: Type
what's the date
. - Tell a Joke: Type
tell me a joke
. - Ask About Weather: Type
what is the weather like
. - Ask Favorite Things: Type
what is your favorite color
orwhat is your favorite food
. - Say Goodbye: Type
bye
to end the chat.
Example Interaction:
========================================
Welcome to the Chatbot! 🤖
========================================
Chatbot: Hello! I'm your virtual assistant. Type 'bye' to exit. 👋
You: hello
Chatbot: Hi there! How can I assist you today? 👋
You: what's the time
Chatbot: The current time is 14:23:45 ⏰
You: bye
Chatbot: Goodbye! Have a fantastic day! 👋
========================================
Thank you for chatting! 🎉
========================================
The chatbot listens for user input, processes it, and responds based on predefined queries. Key elements include:
respond()
Function: Handles user input and returns appropriate responses with emojis.main()
Function: Manages the chat loop and user interaction.