mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-01 17:37:51 +00:00
fix init
This commit is contained in:
parent
71cb3adb4f
commit
cf26e52d89
@ -144,6 +144,7 @@ Reranking is automatically applied at these key retrieval stages:
|
||||
import asyncio
|
||||
from lightrag import LightRAG, QueryParam
|
||||
from lightrag.llm.openai import gpt_4o_mini_complete, openai_embedding
|
||||
from lightrag.kg.shared_storage import initialize_pipeline_status
|
||||
from lightrag.rerank import jina_rerank
|
||||
|
||||
async def my_rerank_func(query: str, documents: list, top_k: int = None, **kwargs):
|
||||
@ -167,6 +168,9 @@ async def main():
|
||||
rerank_model_func=my_rerank_func,
|
||||
)
|
||||
|
||||
await rag.initialize_storages()
|
||||
await initialize_pipeline_status()
|
||||
|
||||
# Insert documents
|
||||
await rag.ainsert([
|
||||
"Document 1 content...",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user