Skip to content

Commit 911b20c

Browse files
fix: error 'history_messages' with LightRAG latest version (#719) bump:patch
* fix: Error: 'history_messages' with LightRAG * added comment
1 parent 2ffe374 commit 911b20c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

libs/ktem/ktem/index/file/graph/lightrag_pipelines.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929

3030
try:
3131
from lightrag import LightRAG, QueryParam
32+
33+
# newer verisons of LightRAG needs to be initialized before using
34+
from lightrag.kg.shared_storage import initialize_pipeline_status
35+
3236
from lightrag.operate import (
3337
_find_most_related_edges_from_entities,
3438
_find_most_related_text_unit_from_entities,
@@ -235,6 +239,11 @@ def build_graphrag(working_dir, llm_func, embedding_func):
235239
llm_model_func=llm_func,
236240
embedding_func=embedding_func,
237241
)
242+
243+
# newer verisons of LightRAG needs to be initialized before using
244+
asyncio.run(graphrag_func.initialize_storages())
245+
asyncio.run(initialize_pipeline_status())
246+
238247
return graphrag_func
239248

240249

0 commit comments

Comments
 (0)