update
This commit is contained in:
17
examples/query.py
Normal file
17
examples/query.py
Normal 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)
|
Reference in New Issue
Block a user