2025-12-11 19:09:10 +08:00
|
|
|
|
"""
|
|
|
|
|
|
RAG (Retrieval-Augmented Generation) 系统
|
|
|
|
|
|
用于代码索引和语义检索
|
2025-12-16 16:56:09 +08:00
|
|
|
|
|
|
|
|
|
|
🔥 v2.0 改进:
|
|
|
|
|
|
- 支持嵌入模型变更检测和自动重建
|
|
|
|
|
|
- 支持增量索引更新(基于文件 hash)
|
|
|
|
|
|
- 支持索引版本控制和状态查询
|
2025-12-11 19:09:10 +08:00
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
from .splitter import CodeSplitter, CodeChunk
|
|
|
|
|
|
from .embeddings import EmbeddingService
|
2025-12-16 16:56:09 +08:00
|
|
|
|
from .indexer import (
|
|
|
|
|
|
CodeIndexer,
|
|
|
|
|
|
IndexingProgress,
|
|
|
|
|
|
IndexingResult,
|
|
|
|
|
|
IndexStatus,
|
|
|
|
|
|
IndexUpdateMode,
|
|
|
|
|
|
INDEX_VERSION,
|
|
|
|
|
|
)
|
2025-12-11 19:09:10 +08:00
|
|
|
|
from .retriever import CodeRetriever
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
|
"CodeSplitter",
|
|
|
|
|
|
"CodeChunk",
|
|
|
|
|
|
"EmbeddingService",
|
|
|
|
|
|
"CodeIndexer",
|
|
|
|
|
|
"CodeRetriever",
|
2025-12-16 16:56:09 +08:00
|
|
|
|
"IndexingProgress",
|
|
|
|
|
|
"IndexingResult",
|
|
|
|
|
|
"IndexStatus",
|
|
|
|
|
|
"IndexUpdateMode",
|
|
|
|
|
|
"INDEX_VERSION",
|
2025-12-11 19:09:10 +08:00
|
|
|
|
]
|
|
|
|
|
|
|