AI Answer Engine is a sophisticated chat interface that leverages Large Language Models (LLMs) to provide context-aware responses with source citations. The system can process multiple URLs simultaneously, extract relevant information, and engage in meaningful conversations while maintaining proper attribution.
- 🤖 Advanced chat interface ( gemini flash 2.0 model)
- 📊 Data visualization capabilities for CSV and structured data
- 🎥 YouTube video transcript analysis
- 📄 PDF document parsing and analysis
- 🌐 Web content extraction and analysis
- 📊 Automatic chart generation for numerical data
- 💾 Chat history persistence with Redis
- 🔗 Shareable chat sessions
- Next.js 14: App Router and Server Components
- Redis (Upstash): Rate limiting and data persistence
- Google Gemini AI: Large Language Model integration
- Tailwind CSS: Responsive UI design
- Puppeteer: Headless browser automation
- Cheerio: HTML parsing and data extraction
- Chart.js: Data visualization
- React Markdown: Content rendering
- Clone the repository:
git clone https://github.com/yourusername/ai-answer-engine.git
cd ai-answer-engine- Install dependencies:
npm install- Set up environment variables:
Create a
.envfile with:
UPSTASH_REDIS_REST_URL=your_redis_url
UPSTASH_REDIS_REST_TOKEN=your_redis_token
GEMINI_API_KEY=your_gemini_api_key- Run the development server:
npm run devVisit http://localhost:3000 to see the application.
-
UI Layer (
src/app/page.tsx)- Chat interface implementation
- Real-time response handling
- State management
- Share functionality
-
API Layer (
src/app/api/chat/route.ts)- LLM integration
- Web scraping implementation
- Data visualization generation
- Response formatting
-
Middleware (
src/middleware.ts)- Rate limiting implementation
- Request validation
- Error handling
Check out our video demo here: https://youtu.be/D3eZmsAy2lI?si=7ScyRUdvYJh8smsC
Built with ❤️ Sheick using Next.js, Redis, and Google Gemini AI
