How datnguyentrung/ai-receptionist-be-py works
This repository contains two distinct products: a FastAPI face-embedding service and a separate ADK-based Taekwondo ingestion/GraphRAG application. The primary API workflow validates an uploaded image, detects exactly one face, and returns a validated vector; it does not persist or search embeddings. The ADK workflow stages document batches, accepts scoped semantic submissions, and only promotes graph data through an explicit fill step. README documents the broader ingestion, ontology, and retrieval capabilities; some corresponding implementation paths are unsampled, so their internal links are omitted where source evidence is unavailable.
Main entry points: ingestion_tools.py Ingestion tools · ingestion_runtime.py Runtime container · main.py FastAPI application · face_embedding_service.py Image processing
Components 26
Face embedding API
- FastAPI application
app/main.py - Embedding endpoint
app/api/face_embedding_api.py - Image processing
app/services/face_embedding_service.py - Face model
app/utils/insightface_utils.py - Embedding response
app/schemas/face_embedding_schema.py - API error mapping
app/exceptions/exception_handler.py
ADK ingestion
- ADK Web process
app/adk_web.py - ADK agent
app/agent/agent.py - Ingestion skill
app/agent/skills/ingestion/ingestion.py - Ingestion tools
app/agent/tools/ingestion_tools.py - Runtime container
app/core/ingestion_runtime.py - Document preparation
app/services/ingestion/document - Batch workspace
app/services/ingestion/workspace/staged_ingestion.py - Ingestion operations
app/services/ingestion/operations.py - Workspace repository
app/services/ingestion/repository.py - Neo4j graph store
app/services/ingestion/graph_store.py
GraphRAG
- Embedding provider
app/services/graphrag/embeddings.py - Graph QA skill
app/agent/skills/graph-qa/tools.py - GraphRAG tools
app/agent/tools/graphrag_tools.py - Knowledge retrieval
app/services/graphrag/retrieval.py - Cited answer
Ontology services
- Ontology management
app/services/ingestion/ontology.py - Ontology lifecycle
app/services/ontology_lifecycle.py - Ontology compiler
app/services/ontology_compiler.py
Other components
- Image uploader
- Ingestion user
Connections 29
- Image uploader → FastAPI application: uploads image
- FastAPI application → Embedding endpoint: routes request
app/main.py - Embedding endpoint → Image processing: invokes processing
app/api/face_embedding_api.py - Image processing → Face model: detects face
app/services/face_embedding_service.py - Image processing → Embedding response: returns vector
app/api/face_embedding_api.py - FastAPI application → API error mapping: registers handlers
app/main.py - Ingestion user → ADK Web process: uses ingestion UI
- ADK Web process → Runtime container: initializes runtime
- ADK agent → Ingestion skill: loads skill
- Ingestion skill → Ingestion tools: invokes workflow tools
- Ingestion tools → Runtime container: gets services
app/agent/tools/ingestion_tools.py - Ingestion tools → Ingestion operations: composes operations
app/agent/tools/ingestion_tools.py - Ingestion tools → Batch workspace: manages batches
- Ingestion tools → Workspace repository: persists workspace
- Ingestion tools → Ontology management: uses ontology primitives
- Ingestion tools → Neo4j graph store: fills graph
- Runtime container → Workspace repository: constructs repository
app/core/ingestion_runtime.py - Runtime container → Neo4j graph store: constructs graph store
app/core/ingestion_runtime.py - Runtime container → Embedding provider: constructs provider
app/core/ingestion_runtime.py - Runtime container → Ontology compiler: constructs compiler
app/core/ingestion_runtime.py - Runtime container → Ontology lifecycle: constructs lifecycle
app/core/ingestion_runtime.py - Ingestion tools → Document preparation: prepares documents
- Graph QA skill → GraphRAG tools: calls retrieval tool
- GraphRAG tools → Knowledge retrieval: invokes retrieval
app/agent/tools/graphrag_tools.py - Knowledge retrieval → Neo4j graph store: searches graph
app/services/graphrag/retrieval.py - Knowledge retrieval → Embedding provider: uses embeddings
app/services/graphrag/retrieval.py - Graph QA skill → Cited answer: returns cited answer
- Ontology management → Ontology lifecycle: supports version lifecycle
- Ontology lifecycle → Ontology compiler: compiles ontology