main
HuangHai 2 weeks ago
parent a590b5f59c
commit e979ff4ac5

@ -0,0 +1,12 @@
-- 清库脚本
truncate table chunk_entity_relation._ag_label_edge;
truncate table chunk_entity_relation._ag_label_vertex;
truncate table chunk_entity_relation.base;
-- truncate table chunk_entity_relation.DIRECTED;
truncate table public.lightrag_doc_chunks;
truncate table public.lightrag_doc_full;
truncate table public.lightrag_doc_status;
truncate table public.lightrag_llm_cache;
truncate table public.lightrag_vdb_entity;
truncate table public.lightrag_vdb_relation;

@ -22,7 +22,7 @@ WORKING_DIR = f"./dsWorking"
#### 下面三个要注意写清楚内容 ####
# 1、工作空间【知识库名称】
workspace = "dsideal"
workspace = "Chinese"
# 2、文档名称【不允许出现重复因为后面需要以此为条件查询】
docx_name = "sushi.txt"
# 3、文档路径

@ -19,15 +19,14 @@ handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
logger.addHandler(handler)
WORKING_DIR = f"./dickens-pg"
WORKING_DIR = f"./dsWorking"
logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO)
async def main():
try:
rag = await initialize_pg_rag(WORKING_DIR=WORKING_DIR, workspace='default')
#rag = await initialize_pg_rag(WORKING_DIR=WORKING_DIR, workspace='dsideal')
rag = await initialize_pg_rag(WORKING_DIR=WORKING_DIR, workspace='Chinese')
resp = await rag.aquery(
# "苏轼的家人都有谁?",
"苏轼与美食",

Loading…
Cancel
Save