Transform your WhatsApp conversations into an AI chatbot that perfectly mimics anyone's texting style! Upload your chat history and watch as the AI learns their personality, phrases, and communication patterns.
- AI-Powered Chat Analysis: Deep learning of conversation patterns, personality traits, and communication style from your actual chats
- Optional Chat Upload: Create a bot with just a persona description, or upload chats for maximum accuracy
- Real-Time API Validation: Instant validation of your Gemini API key with clear feedback
- Smart Chat Parser: Automatically extracts conversation pairs and analyzes messaging patterns
- Profile Customization: Upload profile photos and customize every detail
- WhatsApp-like Interface: Authentic WhatsApp chat experience with typing indicators
- Powered by Gemini 2.0: Uses Google's latest Gemini Flash model for natural, context-aware responses
- Privacy-Focused: All data stored locally, no third-party data collection
- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy the key (you'll use it in setup)
Windows (Easy Start):
# Double-click start.bat
start.batMac/Linux:
chmod +x start.sh
./start.shManual Setup:
# Create virtual environment
python -m venv venv
# Activate it
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the app
python app.pyNavigate to: http://localhost:5000
Step 1: Upload Chat (Optional)
- Upload your WhatsApp chat export for AI analysis, OR
- Skip this step to create a bot with just a persona description
- Uploading chat = More accurate personality mimicry
Step 2: Configure Details
- Your name and their name (case-sensitive!)
- Gender selection
- Relationship type
- Gemini API Key (validated instantly with ✓ or ✗ feedback)
- Optional: Upload their profile photo
Step 3: Define Persona
- Describe their personality, texting style, and typical phrases
- Or use a template (Friend, Romantic, Professional)
- The more detail, the better the results!
- Open WhatsApp → Select chat
- Tap ⋮ (three dots) → More → Export chat
- Choose Without Media
- Save the .txt file
- Open WhatsApp → Select chat
- Tap contact name → Export Chat
- Choose Without Media
- Save the .txt file
- Instant Validation: API key is tested immediately as you type
- Clear Feedback: Green checkmark for valid keys, red X with error message for invalid
- Smart Debouncing: Waits 1 second after you stop typing to validate
- Prevents Errors: Can't proceed with invalid API key
When you upload a chat, the AI analyzes:
- Communication Style: Formal, casual, playful, sarcastic, etc.
- Personality Traits: Sweet, caring, funny, dramatic, etc.
- Common Topics: What they talk about most
- Typical Phrases: Their catchphrases and expressions
- Emoji Usage: Which emojis they use and when
- Language Patterns: Code-switching, slang, mixing languages
- Emotional Range: How they express different emotions
- Response Patterns: How they typically reply in conversations
You are a sweet, sarcastic, emotionally intelligent girl.
You often switch between Marathi and Hindi/English, especially in emotional moments.
Common phrases you use:
- "Khadyat jaa"
- "Dukkar 🐷"
- "Arey baba"
- "Gap bass"
Your favorite emojis: ❤️ 🤌🏻 🫶🏻 😂 ✨ 🐷
You reply in short, natural sentences like in WhatsApp.
Tone: Like a best friend - sometimes flirty, sometimes caring, sometimes brutally honest.
When happy/playful: "Dukkar! 😂 kay chalu aahe?"
When caring: "Important ahe re tu mzya sathi ❤️"
When teasing: "Tuch na? 😉"
ChatMimic AI/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── README.md # This file
├── start.bat / start.sh # Quick start scripts
│
├── templates/
│ ├── index.html # Setup/onboarding page
│ └── chat.html # WhatsApp-like chat interface
│
├── static/
│ ├── css/
│ │ ├── setup.css # Setup page styles
│ │ └── chat.css # Chat interface styles
│ ├── js/
│ │ ├── setup.js # Setup page logic + API validation
│ │ └── chat.js # Chat functionality
│ ├── images/
│ │ └── profiles/ # User-uploaded profile photos
│ └── favicon.svg # App icon
│
├── uploads/ # Temporary chat files (auto-deleted)
└── user_data/ # User configs and conversation pairs
├── {user_id}_config.json
└── {user_id}_qa_pairs.txt
- Model: Gemini 2.0 Flash Experimental
- Few-Shot Learning: Uses up to 50 conversation pairs as examples
- Deep Analysis: Comprehensive personality and pattern analysis
- Temperature: 0.9 (creative but consistent)
- Max Tokens: 150 (short, WhatsApp-style responses)
- Supports multiple WhatsApp export formats (Android, iPhone)
- Extracts message pairs (User → Bot reply)
- Filters system messages (media, calls, group actions)
- Case-sensitive name matching
- Handles emojis and special characters safely
- QA Pairs:
user_data/{user_id}_qa_pairs.txt - Config:
user_data/{user_id}_config.json - Chat Analysis: Stored in config JSON
- API Key: Encrypted storage, never sent to frontend
- Uploaded Files: Auto-deleted after processing
- Upload Quality Chats: More messages = better learning (50+ messages recommended)
- Be Specific: The more detailed your persona description, the better
- Include Examples: Show how they reply in different moods and situations
- Match Names Exactly: Names are case-sensitive - must match the chat export
- Describe Patterns: Language mixing, emoji usage, slang, typical responses
- Use Chat Analysis: Upload chat for AI to analyze their actual style
"API key is invalid or doesn't have permission"
- Generate a new key at Google AI Studio
- Make sure you copied the entire key
- Check that Gemini API is enabled for your project
"Could not extract conversation pairs"
- Names are case-sensitive - check the exact spelling in your chat
- Make sure there are back-and-forth conversations (not just one person talking)
- The chat must be a proper WhatsApp export .txt file
File not uploading / requires multiple attempts
- Check file size (max 10MB for chats, 5MB for photos)
- Ensure file is .txt format for chats, image format for photos
- Try refreshing the page and uploading again
- Check browser console (F12) for errors
Bot doesn't sound like the person
- Add more details to the persona description
- Upload a chat with more conversation pairs
- Include specific examples of how they respond
- Describe their emoji usage and language patterns
- Clear browser localStorage and restart
- Ensure Flask server is running (check terminal)
- Try accessing http://127.0.0.1:5000 instead
- Check browser console for JavaScript errors (F12)
- ✓ All chat data processed locally on your machine
- ✓ No third-party tracking or analytics
- ✓ API key stored locally, used only for Gemini API
- ✓ Uploaded files deleted immediately after processing
- ✓ User data stays in local
user_data/folder - ✓ No data sent anywhere except Google Gemini API
- Requires Google Gemini API key (free tier: 1500 requests/day)
- Works best with 50+ conversation pairs
- Name matching is case-sensitive
- Supports English, Hindi, Marathi, and mixed languages
- Cannot process media messages (images, videos, voice notes)
- Voice message feature not yet implemented
- Support for multiple chat imports
- Voice message support
- Export conversation history
- Advanced personality fine-tuning
- Multi-user support
- Conversation analytics dashboard
- More language support
Built with:
- Backend: Flask (Python web framework)
- AI: Google Gemini 2.0 Flash
- Frontend: Vanilla JavaScript, HTML5, CSS3
- UI Design: WhatsApp-inspired interface
- Real-time Validation: Fetch API with debouncing
This project is for educational and personal use only.
Important: Please respect privacy and obtain explicit consent before creating AI chatbots that mimic real people. This tool is designed for fun, learning, and personal experimentation - not for deception or impersonation.
Found a bug or have a feature idea? Feel free to:
- Open an issue on GitHub
- Submit a pull request
- Share feedback and suggestions
Made with ❤️ for creating authentic AI chat experiences
Enjoy chatting with your AI clone! 🤖💬
For questions or support, check the troubleshooting section above or review the code comments in app.py.