Files
DeepTutor/web/app
Tushar Khatri 44acb1a844 Complete RAG plugin system integration with full knowledge base support
✅ Fixed RAG Provider Selection Persistence:
- get_current_provider() now reads from env directly (not cached)
- Settings save button now saves environment variables
- Backend persists changes to .env file
- RAG provider selection survives page refreshes and server restarts

✅ Integrated Plugin System into Knowledge Base Upload Flow:
- initializer.py: Use RAG-Anything for extraction + selected plugin for indexing
- add_documents.py: Same hybrid approach for adding new documents
- Both LightRAG and LlamaIndex work seamlessly end-to-end

✅ Plugin Storage Architecture:
- LightRAG: data/knowledge_bases/{kb}/rag_storage/
- LlamaIndex: data/knowledge_bases/{kb}/llamaindex_storage/
- Both auto-create directories, no conflicts

✅ Complete Upload Flow:
1. User uploads files → saved to raw/
2. System checks RAG_PROVIDER from .env
3. RAG-Anything extracts content (PDFs, images, tables)
4. Extracted text fed to selected RAG plugin
5. Plugin builds index in provider-specific directory

✅ Files Modified:
- src/tools/rag_tool.py - Fixed get_current_provider()
- web/app/settings/page.tsx - Save env vars in handleSave()
- src/api/routers/settings.py - Persist to .env file
- src/knowledge/initializer.py - Plugin integration
- src/knowledge/add_documents.py - Plugin integration
- src/rag/plugins/lightrag.py - Auto-create directories
- src/rag/plugins/llamaindex.py - New plugin + auto-create dirs
- requirements.txt - Added llama-index dependencies

Result: Users can now seamlessly switch between LightRAG and LlamaIndex,
upload documents via dashboard, and everything works perfectly from start to end.
2026-01-06 17:47:20 +05:30
..
2025-12-28 23:45:41 +08:00
2025-12-28 23:45:41 +08:00
2025-12-28 23:45:41 +08:00
2025-12-28 23:45:41 +08:00
2026-01-06 12:33:49 +08:00
2026-01-06 12:33:49 +08:00
2025-12-28 23:45:41 +08:00
2025-12-29 13:25:10 +08:00
2026-01-06 01:56:17 +08:00