How codewithdark-git/darkgpt works
This Flask backend accepts document uploads and chat queries: the upload endpoint saves a file temporarily and asks the vector-store component to process it, while the chat endpoint passes a query to an LLM pipeline and returns its response. Separate audio and video handlers transcribe uploads with Whisper; a text pipeline also delegates embedding work to the vector store. The document model suggests a database-backed capability, but its database setup is not present in the supplied tree. The README is empty, so unsampled subsystem behavior is not inferred.
Main entry points: upload.py Document Upload · endpoints.py Chat Endpoint · app.py Flask App · llm_pipeline.py LLM Pipeline
Components 12
HTTP API
- Flask App
backend/app/app.py - Document Upload
backend/app/api/upload.py - Chat Endpoint
backend/app/api/endpoints.py
Query and Documents
- LLM Pipeline
backend/app/core/llm_pipeline.py - Vector Store
backend/app/core/vector_store.py - Text Pipeline
backend/app/core/text_pipeline.py
Media and Data
- Document Model
backend/app/models/document.py - Video Transcription
backend/app/services/video_handler.py - Audio Transcription
backend/app/services/text_to_speech.py
Other components
- Client
- Groq Model
- OpenAI Whisper
Connections 10
- Flask App → Document Upload: registers route
backend/app/app.py - Flask App → Chat Endpoint: registers route
backend/app/app.py - Client → Document Upload: uploads document
backend/app/api/upload.py - Client → Chat Endpoint: sends query
backend/app/api/endpoints.py - Document Upload → Vector Store: adds document
backend/app/api/upload.py - Chat Endpoint → LLM Pipeline: processes query
backend/app/api/endpoints.py - LLM Pipeline → Groq Model: generates response
backend/app/core/llm_pipeline.py - Text Pipeline → Vector Store: stores embedding
backend/app/core/text_pipeline.py - Video Transcription → OpenAI Whisper: transcribes video
backend/app/services/video_handler.py - Audio Transcription → OpenAI Whisper: transcribes audio
backend/app/services/text_to_speech.py