A full-featured multimodal chatbot powered by Mistral Pixtral โ with multilingual support, regional TTS, file understanding, and session memory.
git clone <your-repo-url> cd chatbot npm install
cp .env.example .env
MISTRAL_API_KEY=your_key_here PORT=3000
node server.js
http://localhost:3000 โ the chatbot is ready.| Method | Endpoint | Description |
|---|---|---|
| POST | /api/chat | Send message, receive AI reply with session history |
| POST | /api/upload | Upload file (JPG / PNG / PDF, max 10MB) |
| POST | /api/tts | Convert text to speech audio (Edge TTS) |
| DELETE | /api/session/:id | Clear session data and delete uploaded files |
| Package | Purpose |
|---|---|
| express | Web server and routing |
| multer | File upload handling with 10MB limit enforcement |
| better-sqlite3 | Session memory and chat history (synchronous SQLite) |
| pdf-parse | Text extraction from text-based PDFs |
| edge-tts | Text-to-speech via Microsoft Edge neural voices |
| uuid | Session ID and upload filename generation |
| dotenv | Environment variable loading |