How dheerajgopi/rag-llmsmith-fastapi works
Main Components
a) External Components:
• Qdrant Vector Database (for storing embeddings)
• LLM Service (implied by LLMSmith usage)
• Client Applications (making API requests)
b) Internal Components:
• FastAPI Application Server
• Chat Module
• Configuration System
• Data Ingestion System
Client Layer
• HTTP Clients
• REST API Endpoints (/api/chat)
Application Layer
• FastAPI Server (main.py)
• Chat Module:
• API Controller (chat/api.py)
• Service Layer (chat/service.py)
• Models (chat/model.py)
Infrastructure Layer
• Qdrant Vector DB
• LLM Service
• Configuration (config/settings.py)
• Logging (core/log.py)
Flow Representation
Two main flows:
Data Ingestion Flow
• insert-sample-data.py → Embedding Service → Qdrant DB
Chat Flow
• Client → FastAPI → Chat Service → Vector DB (retrieval)
• Chat Service → LLM (generation)
• Chat Service → Client (response)
Key Relationships to Highlight
• The FastAPI application's dependency on configuration and environment variables
• The Chat module's interaction with both Qdrant and LLM services
• The separation between API handling and business logic in the chat module
Additional Details
Annotations for:
• Environment configuration (.env)
• Development tools (requirements.txt, pyproject.toml)
• Sample data flow (test-data directory)
Technical Details to Note
• FastAPI framework for REST API
• LLMSmith for LLM integration
• Qdrant for vector storage
• Python-based implementation
• Environment-based configuration