From 7a60e2182218beed30bed65da5ca6af18f7474b3 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Sat, 12 Jul 2025 08:53:26 +0800 Subject: [PATCH] 'commit' --- dsLightRag/Doc/8、使用PG数据库.md | 2 +- dsLightRag/Test/T1_WriteToPg.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dsLightRag/Doc/8、使用PG数据库.md b/dsLightRag/Doc/8、使用PG数据库.md index 76e689f2..436e9292 100644 --- a/dsLightRag/Doc/8、使用PG数据库.md +++ b/dsLightRag/Doc/8、使用PG数据库.md @@ -7,6 +7,6 @@ docker tag swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/shangor/postgres- - 启动 ``` docker ps -a -docker rm -f 7a41327deb45 +docker rm -f 067d6ec9324d docker run -p 5432:5432 -d --name postgres-LightRag shangor/postgres-for-rag sh -c "service postgresql start && sleep infinity" ``` \ No newline at end of file diff --git a/dsLightRag/Test/T1_WriteToPg.py b/dsLightRag/Test/T1_WriteToPg.py index ab0a4bb0..120ab1dd 100644 --- a/dsLightRag/Test/T1_WriteToPg.py +++ b/dsLightRag/Test/T1_WriteToPg.py @@ -23,7 +23,7 @@ async def main(): try: rag = await initialize_pg_rag(WORKING_DIR=WORKING_DIR,workspace='dsideal') with open(f"../Txt/sushi.txt", "r", encoding="utf-8") as f: - await rag.ainsert(f.read()) + await rag.ainsert(input=f.read(),file_paths=[f"sushi.txt"]) # 添加来源参数 finally: if rag: await rag.finalize_storages()