From 0a5ae70a7c5db0dbafdc1508b872d86e4532d486 Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Wed, 18 Jun 2025 16:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/providers/memory/mem_local_short/mem_local_short.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/xiaozhi-server/core/providers/memory/mem_local_short/mem_local_short.py b/main/xiaozhi-server/core/providers/memory/mem_local_short/mem_local_short.py index 9f855cc6..236f3e7f 100644 --- a/main/xiaozhi-server/core/providers/memory/mem_local_short/mem_local_short.py +++ b/main/xiaozhi-server/core/providers/memory/mem_local_short/mem_local_short.py @@ -5,6 +5,7 @@ import os import yaml from config.config_loader import get_project_dir from config.manage_api_client import save_mem_local_short +from core.utils.util import check_model_key short_term_memory_prompt = """ @@ -145,6 +146,10 @@ class MemoryProvider(MemoryProviderBase): # 打印使用的模型信息 model_info = getattr(self.llm, "model_name", str(self.llm.__class__.__name__)) logger.bind(tag=TAG).debug(f"使用记忆保存模型: {model_info}") + api_key = getattr(self.llm, "api_key", None) + memory_key_msg = check_model_key("记忆总结专用LLM", api_key) + if memory_key_msg: + logger.bind(tag=TAG).error(memory_key_msg) if self.llm is None: logger.bind(tag=TAG).error("LLM is not set for memory provider") return None