HKUDS / LightRAG

"LightRAG: Simple and Fast Retrieval-Augmented Generation"
https://arxiv.org/abs/2410.05779
MIT License
9.26k stars 1.14k forks source link

Encounter problem when using Neo4j as storage. #269

Open SuiJiGuoChengSuiJiGuo opened 1 week ago

SuiJiGuoChengSuiJiGuo commented 1 week ago

I encountered this problem when using Neo4j as storage. img_v3_02gj_ee60c81f-0a35-4ccd-869e-753c13b378bg

I found that "kg" might be replaced with graph_storage, but I still encountered the following question. TypeError: Neo4JStorage.init() got an unexpected keyword argument 'embedding_func'

So I tried switching to the version from a few days ago and found that it could be run successfully.

lezgoverci commented 3 days ago

encountered the same problem.

xiuxiuxius commented 3 days ago

需要修改两个地方:

1. 不是“kg”,而是“graph_storage”:

rag = LightRAG( working_dir=WORKING_DIR, graph_storage="Neo4JStorage", log_level="INFO", ... )

2. 在Class LightRAG中,注释掉embedding_func:

self.chunk_entity_relation_graph = self.graph_storage_cls( namespace="chunk_entity_relation", global_config=asdict(self),

embedding_func=self.embedding_func,

    )

就可以跑起来了