How clovisphere/lucy works
Main Components
a) Interface Layer:
• Web Interface (Static files in app/static)
• CLI Interface (cli.py)
• Telegram Bot Integration
• Future WhatsApp Integration (planned)
b) Application Core:
• Main Application Server (app/web.py)
• Request Handlers (app/handlers.py)
• Configuration Management (app/config.py)
c) Helper Services:
• LLM Service (app/helpers/llm.py)
• RAG Implementation (app/helpers/rag.py)
• Logging Service (app/helpers/logger.py)
d) External Services:
• OpenAI API
• Telegram API
• Document Storage
• Vector Database (implied by RAG implementation)
Specific Elements
[User Interfaces]
• [Web UI] ───┐
• [CLI] ───┤
• [Telegram]──┤
[Application Core] <──┘
• [Request Handlers]
• [Configuration]
• [Helper Services]
• [LLM Service] ────── [OpenAI API]
• [RAG Service] ────── [Vector DB]
• [Logger]
• [Document Storage]
Important Notes
• Document indexing flow separately from the query flow
• RAG pipeline specifically as it's a key feature
• A section for future monitoring/telemetry (Prometheus)
Technical Details to Emphasize
• FastAPI web server implementation
• Python 3.13 runtime environment
• Environment-based configuration
• Document indexing capability
• Real-time chat functionality