A modern, responsive chatbot application powered by Google's Gemini AI API. This application allows you to have text conversations and analyze images using AI.
- 🤖 Text Chat: Have conversations with Gemini AI
- 🖼️ Image Analysis: Upload images and ask questions about them
- 💬 Chat History: View and reuse previous conversations
- 🎨 Modern UI: Clean, responsive design
- ⚡ Real-time Responses: Fast AI responses with loading indicators
- 📱 Mobile Friendly: Works on all device sizes
- Go to Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy your API key
- Rename
gemini.envto.env(if not already done) - Update the API key in
.env:VITE_GEMINI_API_KEY=your_actual_api_key_here
npm installnpm run devThe application will be available at http://localhost:5173
- Type your question in the input field
- Press Enter or click the send button
- Wait for Gemini's response
- Click the gallery icon (📷) in the input area
- Select an image file (JPG, PNG, etc.)
- Type your question about the image
- Press Enter or click send
- Click the menu icon (☰) to expand the sidebar
- View your recent conversations
- Click on any previous chat to reuse it
- Click "New Chat" to start fresh
- gemini-1.5-flash: For both text conversations and image analysis
src/
├── components/
│ ├── Main/ # Main chat interface
│ └── Sidebar/ # Chat history sidebar
├── context/
│ └── Context.jsx # State management
├── assets/
│ └── assets.js # Icon imports
└── App.jsx # Main app component
- Make sure your API key is valid and has proper permissions
- Check that the environment variable is correctly set
- Ensure you have billing enabled on your Google Cloud account
- Supported formats: JPG, PNG, GIF, WebP
- Maximum file size: 4MB
- Make sure the image is not corrupted
- 400 Bad Request: Check your API key and prompt format
- 429 Too Many Requests: You've exceeded the rate limit
- 500 Internal Server Error: Try again in a few minutes
- React 19
- Vite
- Google Generative AI SDK
- CSS3 with Flexbox/Grid
This project is for educational purposes. Make sure to comply with Google's API usage terms.