diff --git a/dsLightRag/Sql/清库脚本.sql b/dsLightRag/Sql/清库脚本.sql new file mode 100644 index 00000000..624e16d7 --- /dev/null +++ b/dsLightRag/Sql/清库脚本.sql @@ -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; \ No newline at end of file diff --git a/dsLightRag/Test/T1_WriteToPg.py b/dsLightRag/Test/T1_WriteToPg.py index 5c633d27..3fbac9af 100644 --- a/dsLightRag/Test/T1_WriteToPg.py +++ b/dsLightRag/Test/T1_WriteToPg.py @@ -22,7 +22,7 @@ WORKING_DIR = f"./dsWorking" #### 下面三个要注意写清楚内容 #### # 1、工作空间【知识库名称】 -workspace = "dsideal" +workspace = "Chinese" # 2、文档名称【不允许出现重复,因为后面需要以此为条件查询】 docx_name = "sushi.txt" # 3、文档路径 diff --git a/dsLightRag/Test/T2_ReadFromPg.py b/dsLightRag/Test/T2_ReadFromPg.py index b4d73d3e..b31a799a 100644 --- a/dsLightRag/Test/T2_ReadFromPg.py +++ b/dsLightRag/Test/T2_ReadFromPg.py @@ -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( # "苏轼的家人都有谁?", "苏轼与美食",