This commit is contained in:
2025-09-07 08:13:00 +08:00
parent dd5ed7fc53
commit bb94553638
5 changed files with 169 additions and 189 deletions

View File

@@ -3,7 +3,6 @@ import logging
from Config.Config import VOLC_ACCESSKEY, VOLC_SECRETKEY
from VikingDBMemoryService import VikingDBMemoryService, MEMORY_COLLECTION_NAME
from Volcengine.chat import wait_for_collection_ready
# 控制日志输出
logger = logging.getLogger('CollectionMemory')
logger.setLevel(logging.INFO)
@@ -47,7 +46,8 @@ def create_memory_collection(collection_name, description="情感陪伴记忆库
# 等待集合就绪
logger.info("等待集合初始化完成...")
if wait_for_collection_ready(memory_service, collection_name):
# 将独立函数调用改为实例方法调用
if memory_service.wait_for_collection_ready():
logger.info(f"集合 '{collection_name}' 已就绪,可以开始使用")
return True
else: