MCPcopy Create free account
hub / github.com/Enfoirer/Text2GraphRAG / _initialize_retrievers

Method _initialize_retrievers

main.py:185–200  ·  view source on GitHub ↗

初始化检索器

(self, chunks: List = None)

Source from the content-addressed store, hash-verified

183 raise
184
185 def _initialize_retrievers(self, chunks: List = None):
186 """初始化检索器"""
187 print("初始化检索引擎...")
188
189 # 如果没有chunks,从数据模块获取
190 if chunks is None:
191 chunks = self.data_module.chunks or []
192
193 # 初始化传统检索器
194 self.traditional_retrieval.initialize(chunks)
195
196 # 初始化图RAG检索器
197 self.graph_rag_retrieval.initialize()
198
199 self.system_ready = True
200 print("✅ 检索引擎初始化完成!")
201
202 def _show_knowledge_base_stats(self):
203 """显示知识库统计信息"""

Callers 1

build_knowledge_baseMethod · 0.95

Calls 1

initializeMethod · 0.45

Tested by

no test coverage detected