Skip to content

shitanshu15/Python-GrokBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– GrokBot โ€“ A Terminal-Based AI Chatbot in Python


๐Ÿ“Œ Project Overview

GrokBot is a rule-based chatbot built using Python that runs entirely in the terminal. It responds intelligently to user inputs such as greetings, time/date queries, questions about Python, mock weather inquiries, and more โ€” offering a simple yet effective conversational experience.


๐ŸŽฏ Purpose

To demonstrate a functional, lightweight chatbot using pure Python โ€” ideal for learning basic NLP techniques, regex-based intent detection, and terminal interactivity without relying on AI APIs.


๐Ÿ’ก Features

  • โœ… Regex-based pattern recognition
  • โœ… Friendly responses to greetings and farewells
  • โœ… Date and time replies using Pythonโ€™s datetime
  • โœ… Fun mock weather responses for any city
  • โœ… Answers general Python-related questions
  • โœ… Fallback responses for unrecognized input
  • โœ… Clean exit and error handling

๐Ÿงฐ Tech Stack

  • Python 3.6+
  • re โ€” for regex-based intent matching
  • random โ€” for varied responses
  • datetime โ€” for current date/time
  • sys โ€” for version checking and clean exits

๐ŸงฐInstallation of Libraries

 pip install re random datetime sys

๐Ÿš€ How to Run

1. Clone the repository

  git clone https://github.com/shitanshu15/GrokBot.git
  cd GrokBot

2. Run the chatbot:

 python GrokBot.py.py

โœ… Make sure you're using Python 3.6 or higher โ€” the script checks this automatically.


๐Ÿง  Try Asking GrokBot:

โœ…hello

โœ…bye

โœ…what is Python?

โœ…tell me the time

โœ…whatโ€™s the weather in Mumbai?

โœ…who are you?

โœ…can you dance?


๐Ÿ’ฌ Sample Output

Starting GrokBot...
Welcome to GrokBot! Type 'exit' or 'quit' to stop.

Current time: 14:12:56  on 2025-07-18

You: hello
GrokBot: Hello! How can I assist you today?

You: what is python?
GrokBot: Python is a versatile programming language used for web development, data science, and more!

You: what's the weather in Delhi?
GrokBot: Weather info isnโ€™t available, but imagine a nice breeze in Delhi!

You: bye
GrokBot: Goodbye! Thanks for chatting!

๐Ÿ“„ License

This project is licensed under the MIT License โ€” feel free to use, modify, and share it with attribution.


๐Ÿ‘จโ€๐Ÿ’ป Developed By

Shitanshu Poreddiwar

๐ŸŽ“ Python Developer Intern @Elite Tech

๐Ÿ”— GitHub: https://github.com/shitanshu15

About

๐Ÿค– A terminal-based Python chatbot using regex and pattern matching. GrokBot responds to greetings, time/date queries, mock weather, and basic questions with natural, dynamic replies โ€” built as part of an internship project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages