You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-22Lines changed: 4 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -224,10 +224,7 @@ For a streaming response implementation example, please see `examples/lightrag_o
224
224
225
225
### ⚠️ Important: Initialization Requirements
226
226
227
-
**LightRAG requires explicit initialization before use.** You must call both `await rag.initialize_storages()` and `await initialize_pipeline_status()` after creating a LightRAG instance, otherwise you will encounter errors like:
228
-
229
-
-`AttributeError: __aenter__` - if storages are not initialized
230
-
-`KeyError: 'history_messages'` - if pipeline status is not initialized
227
+
**LightRAG requires explicit initialization before use.** You must call `await rag.initialize_storages()` after creating a LightRAG instance, otherwise you will encounter errors.
231
228
232
229
### A Simple Program
233
230
@@ -238,7 +235,6 @@ import os
238
235
import asyncio
239
236
from lightrag import LightRAG, QueryParam
240
237
from lightrag.llm.openai import gpt_4o_mini_complete, gpt_4o_complete, openai_embed
241
-
from lightrag.kg.shared_storage import initialize_pipeline_status
242
238
from lightrag.utils import setup_logger
243
239
244
240
setup_logger("lightrag", level="INFO")
@@ -254,9 +250,7 @@ async def initialize_rag():
254
250
llm_model_func=gpt_4o_mini_complete,
255
251
)
256
252
# IMPORTANT: Both initialization calls are required!
0 commit comments