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

Method __init__

rag_modules/graph_indexing.py:48–58  ·  view source on GitHub ↗
(self, config, llm_client)

Source from the content-addressed store, hash-verified

46 """
47
48 def __init__(self, config, llm_client):
49 self.config = config
50 self.llm_client = llm_client
51
52 # 键值对存储
53 self.entity_kv_store: Dict[str, EntityKeyValue] = {}
54 self.relation_kv_store: Dict[str, RelationKeyValue] = {}
55
56 # 索引映射:key -> entity/relation IDs
57 self.key_to_entities: Dict[str, List[str]] = defaultdict(list)
58 self.key_to_relations: Dict[str, List[str]] = defaultdict(list)
59
60 def create_entity_key_values(self, diseases: List[Any], symptoms: List[Any],
61 treatments: List[Any], medications: List[Any],

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected