diff --git a/dsLightRag/Config/Config.py b/dsLightRag/Config/Config.py index 0c1a9a28..fe76f061 100644 --- a/dsLightRag/Config/Config.py +++ b/dsLightRag/Config/Config.py @@ -3,15 +3,15 @@ ALY_AK = 'LTAI5tE4tgpGcKWhbZg6C4bh' ALY_SK = 'oizcTOZ8izbGUouboC00RcmGE8vBQ1' # 大模型 【DeepSeek深度求索官方】 -# LLM_API_KEY = "sk-44ae895eeb614aa1a9c6460579e322f1" -# LLM_BASE_URL = "https://api.deepseek.com" -# LLM_MODEL_NAME = "deepseek-chat" +LLM_API_KEY = "sk-44ae895eeb614aa1a9c6460579e322f1" +LLM_BASE_URL = "https://api.deepseek.com" +LLM_MODEL_NAME = "deepseek-chat" # 阿里云提供的大模型服务 -LLM_API_KEY = "sk-f6da0c787eff4b0389e4ad03a35a911f" -LLM_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1" +#LLM_API_KEY = "sk-f6da0c787eff4b0389e4ad03a35a911f" +#LLM_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1" # LLM_MODEL_NAME = "qwen-plus" # 不要使用通义千问,会导致化学方程式不正确! -LLM_MODEL_NAME = "deepseek-v3" +#LLM_MODEL_NAME = "deepseek-v3" EMBED_MODEL_NAME = "BAAI/bge-m3" EMBED_API_KEY = "sk-pbqibyjwhrgmnlsmdygplahextfaclgnedetybccknxojlyl" diff --git a/dsLightRag/Config/__pycache__/Config.cpython-310.pyc b/dsLightRag/Config/__pycache__/Config.cpython-310.pyc index c5ecd364..a3eeeec6 100644 Binary files a/dsLightRag/Config/__pycache__/Config.cpython-310.pyc and b/dsLightRag/Config/__pycache__/Config.cpython-310.pyc differ diff --git a/dsLightRag/Doc/8、使用PG数据库.md b/dsLightRag/Doc/8、使用PG数据库.md index b318ef4d..76e689f2 100644 --- a/dsLightRag/Doc/8、使用PG数据库.md +++ b/dsLightRag/Doc/8、使用PG数据库.md @@ -6,6 +6,7 @@ docker tag swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/shangor/postgres- - 启动 ``` -docker rm if -f postgres-LightRag +docker ps -a +docker rm -f 7a41327deb45 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 45e596b7..58aedb6c 100644 --- a/dsLightRag/Test/T1_WriteToPg.py +++ b/dsLightRag/Test/T1_WriteToPg.py @@ -21,7 +21,7 @@ logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO) async def main(): try: - rag = await initialize_pg_rag(WORKING_DIR=WORKING_DIR,namespace_prefix='huanghai') + rag = await initialize_pg_rag(WORKING_DIR=WORKING_DIR) with open(f"../Txt/sushi.txt", "r", encoding="utf-8") as f: await rag.ainsert(f.read()) finally: diff --git a/dsLightRag/Util/LightRagUtil.py b/dsLightRag/Util/LightRagUtil.py index 0a37a96b..3f6c588d 100644 --- a/dsLightRag/Util/LightRagUtil.py +++ b/dsLightRag/Util/LightRagUtil.py @@ -152,7 +152,7 @@ os.environ["POSTGRES_PASSWORD"] = POSTGRES_PASSWORD os.environ["POSTGRES_DATABASE"] = POSTGRES_DATABASE -async def initialize_pg_rag(WORKING_DIR, namespace_prefix): +async def initialize_pg_rag(WORKING_DIR): rag = LightRAG( working_dir=WORKING_DIR, llm_model_func=llm_model_func, @@ -169,8 +169,7 @@ async def initialize_pg_rag(WORKING_DIR, namespace_prefix): doc_status_storage="PGDocStatusStorage", graph_storage="PGGraphStorage", vector_storage="PGVectorStorage", - auto_manage_storages_states=False, - namespace_prefix=namespace_prefix, + auto_manage_storages_states=False ) await rag.initialize_storages() diff --git a/dsLightRag/Util/__pycache__/LightRagUtil.cpython-310.pyc b/dsLightRag/Util/__pycache__/LightRagUtil.cpython-310.pyc index 253fd213..40c74649 100644 Binary files a/dsLightRag/Util/__pycache__/LightRagUtil.cpython-310.pyc and b/dsLightRag/Util/__pycache__/LightRagUtil.cpython-310.pyc differ