Context-aware chatbot that routes questions to NEC codes, Wattmonk docs, or general chat. Includes search, PDF ingestion into Pinecone, source attribution, and provider selection.
- Multi-context handling (NEC / Wattmonk / General)
- Source attribution with citations
- Conversation memory (last 10 turns)
- Search panel for knowledge base
- PDF upload + Pinecone ingestion
- Confidence scoring and query suggestions
- Multiple LLM providers (Gemini / OpenRouter / NVIDIA)
- Frontend: Next.js 14, React, Tailwind CSS
- Backend: Next.js API routes
- Vector DB: Pinecone (optional)
- LLMs: Gemini / OpenRouter / NVIDIA
pnpm install
cp .env.example .env
pnpm run devSee .env.example for full list.
Required:
GEMINI_API_KEYorOPENROUTER_API_KEYorNVIDIA_API_KEY
Optional:
PINECONE_API_KEYPINECONE_INDEXPINECONE_HOSTPINECONE_NAMESPACEPINECONE_TEXT_FIELDPINECONE_QUERY_FIELDPINECONE_ENABLED=false
Use the Upload documents panel to add PDFs.
pnpm run ingest -- C:\path\to\file.pdf --category nec- Architecture:
ARCHITECTURE.md - API:
API.md - User guide:
USER_GUIDE.md - Deployment:
DEPLOYMENT.md - Performance template:
PERFORMANCE.md - Submission checklist:
SUBMISSION.md
- OpenRouter 404: model slug not available for your key.
- Gemini 429: quota exceeded; switch providers.
- Pinecone errors: set
PINECONE_ENABLED=falseor verifyPINECONE_HOSTand integrated embedding field map.
Apache2.0