This commit is contained in:
Larfii
2024-10-07 18:48:45 +08:00
parent 13c67c2bcf
commit fba232487b
6 changed files with 152 additions and 5 deletions

17
examples/query.py Normal file
View File

@@ -0,0 +1,17 @@
import os
import sys
sys.path.append('xxx/xxx/LightRAG')
from lightrag import LightRAG, QueryParam
os.environ["OPENAI_API_KEY"] = ""
WORKING_DIR = ""
rag = LightRAG(working_dir=WORKING_DIR)
mode = 'global'
query_param = QueryParam(mode=mode)
result, _ = rag.query("", param=query_param)
print(result)