Skip to content

Ritexh5090/AI-CHAT-BOT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Auto Reply Bot (WhatsApp / Messaging Automation)

This project is an AI-powered auto-reply bot that reads messages from a messaging app screen, sends them to an AI model (Groq API), and automatically replies using keyboard and mouse automation.

It uses screen automation to copy messages and generate intelligent responses using Llama 3 (Groq API).


⚙️ Features

  • 📋 Automatically reads latest message from screen
  • 🤖 Sends message to AI (Llama 3 via Groq API)
  • 💬 Generates smart replies instantly
  • 📤 Auto-pastes and sends response
  • 🔁 Runs continuously in a loop
  • 🧠 AI-powered conversation handling

🛠️ Technologies Used

  • Python 3
  • pyautogui (mouse/keyboard automation)
  • pyperclip (clipboard handling)
  • time module
  • Groq API (Llama 3 model)

📁 Project Structure

AI-Auto-Reply-Bot/
│── bot.py
│── README.md

🚀 Installation

1. Install Python

Make sure Python 3 is installed.

2. Install required libraries

pip install pyautogui pyperclip groq

🔑 API Setup (Important)

This project uses Groq API.

Replace your API key in the code:

client = Groq(api_key="YOUR_API_KEY_HERE")

▶️ How to Run

  1. Open your messaging app (WhatsApp Web / Messenger / etc.)
  2. Adjust screen coordinates in the code (IMPORTANT)
  3. Run the script:
python bot.py

⚠️ IMPORTANT NOTE (VERY IMPORTANT)

👉 You must adjust cursor coordinates according to your screen and messaging app position

Example in code:

pyautogui.moveTo(1828, 880)
pyautogui.dragTo(1825, 730, duration=0.4, button="left")

pyautogui.click(1715, 950)

🔧 You NEED to change these values based on:

  • Your screen resolution
  • Your WhatsApp/Web chat position
  • Your chat input box position

If coordinates are wrong, the bot will not work properly.


🧠 How It Works

  1. Bot waits for new message
  2. Selects last message using mouse drag
  3. Copies text to clipboard
  4. Sends text to Groq AI (Llama 3 model)
  5. Receives AI response
  6. Copies reply and pastes it into chat
  7. Sends message automatically
  8. Repeats the cycle

⏳ Delay System

Delays are added to:

  • Prevent spam detection
  • Allow message loading
  • Ensure stable automation

🔮 Future Improvements

  • Add WhatsApp Web API instead of screen automation
  • Improve message detection using OCR
  • Add GUI control panel
  • Add memory for conversation history
  • Multi-chat support

⚠️ Disclaimer

This project uses screen automation, so:

  • It may break if UI changes
  • It depends on screen resolution
  • Use responsibly and avoid spam usage

👨‍💻 Author

Ritesh Jagtap

GitHub: https://github.com/Ritexh5090


⭐ If you like this project, consider giving it a star on GitHub!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages