File size: 932 Bytes
88bdcff
 
 
 
 
78caafb
 
88bdcff
 
 
 
 
 
 
78caafb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""RAG (Retrieval Augmented Generation) module for FDAM AI Pipeline.

This module provides document chunking, vector storage, and retrieval
for the FDAM knowledge base.

Lazy imports to avoid chromadb dependency at module load time for local development.
"""

__all__ = [
    "SemanticChunker",
    "Chunk",
    "ChromaVectorStore",
    "FDAMRetriever",
]


def __getattr__(name):
    """Lazy import RAG modules only when accessed."""
    if name == "SemanticChunker":
        from .chunker import SemanticChunker
        return SemanticChunker
    elif name == "Chunk":
        from .chunker import Chunk
        return Chunk
    elif name == "ChromaVectorStore":
        from .vectorstore import ChromaVectorStore
        return ChromaVectorStore
    elif name == "FDAMRetriever":
        from .retriever import FDAMRetriever
        return FDAMRetriever
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")