better:优化记忆生成

This commit is contained in:
SengokuCola
2025-10-05 15:38:13 +08:00
parent a3009e0128
commit f44857d856
5 changed files with 38 additions and 10 deletions

View File

@@ -500,8 +500,8 @@ def filter_mai_messages(messages: List[DatabaseMessages]) -> List[DatabaseMessag
def translate_pid_to_description(pid: str) -> str:
image = Images.get_or_none(Images.image_id == pid)
description = ""
if image and image.description:
description = image.description
if image and image.description and image.description.strip():
description = image.description.strip()
else:
description = "[图片]"
return description