From adb4416ca2f2521d1502db670574eaeaa91b702f Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Sun, 7 Sep 2025 08:02:23 +0800 Subject: [PATCH] 'commit' --- dsLightRag/Volcengine/T1_DropIndex.py | 5 ++--- dsLightRag/Volcengine/T2_CreateIndex.py | 6 ++---- dsLightRag/Volcengine/VikingDBMemoryService.py | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dsLightRag/Volcengine/T1_DropIndex.py b/dsLightRag/Volcengine/T1_DropIndex.py index 88060a51..d69f1195 100644 --- a/dsLightRag/Volcengine/T1_DropIndex.py +++ b/dsLightRag/Volcengine/T1_DropIndex.py @@ -1,5 +1,5 @@ import json -from VikingDBMemoryService import VikingDBMemoryService +from VikingDBMemoryService import VikingDBMemoryService, MEMORY_COLLECTION_NAME from Config.Config import VOLC_ACCESSKEY, VOLC_SECRETKEY def drop_existing_collection(collection_name): @@ -34,5 +34,4 @@ def drop_existing_collection(collection_name): if __name__ == "__main__": # 可修改为目标集合名称 - TARGET_COLLECTION = "emotional_support" - drop_existing_collection(TARGET_COLLECTION) \ No newline at end of file + drop_existing_collection(MEMORY_COLLECTION_NAME) \ No newline at end of file diff --git a/dsLightRag/Volcengine/T2_CreateIndex.py b/dsLightRag/Volcengine/T2_CreateIndex.py index e8e558c1..7a2b0353 100644 --- a/dsLightRag/Volcengine/T2_CreateIndex.py +++ b/dsLightRag/Volcengine/T2_CreateIndex.py @@ -1,7 +1,7 @@ import json from Config.Config import VOLC_ACCESSKEY, VOLC_SECRETKEY -from VikingDBMemoryService import VikingDBMemoryService +from VikingDBMemoryService import VikingDBMemoryService, MEMORY_COLLECTION_NAME from Volcengine.chat import wait_for_collection_ready @@ -52,6 +52,4 @@ def create_memory_collection(collection_name, description="情感陪伴记忆库 raise if __name__ == "__main__": - # 可修改为目标集合名称 - TARGET_COLLECTION = "emotional_support" - create_memory_collection(TARGET_COLLECTION) \ No newline at end of file + create_memory_collection(MEMORY_COLLECTION_NAME) \ No newline at end of file diff --git a/dsLightRag/Volcengine/VikingDBMemoryService.py b/dsLightRag/Volcengine/VikingDBMemoryService.py index 549b074d..3e38b461 100644 --- a/dsLightRag/Volcengine/VikingDBMemoryService.py +++ b/dsLightRag/Volcengine/VikingDBMemoryService.py @@ -17,6 +17,8 @@ from volcenginesdkarkruntime import Ark from Config.Config import VOLC_SECRETKEY, VOLC_ACCESSKEY, VOLC_API_KEY +# 记忆体集合名称 +MEMORY_COLLECTION_NAME="dsideal_collection" def initialize_services(ak=None, sk=None, ark_api_key=None): """初始化记忆数据库服务和LLM客户端"""