Merge remote-tracking branch 'rikki/tc_merge' into refractor

This commit is contained in:
tcmofashi
2025-03-11 17:00:29 +08:00
6 changed files with 48 additions and 30 deletions

View File

@@ -315,6 +315,10 @@ class ImageManager:
prompt = "请用中文描述这张图片的内容。如果有文字请把文字都描述出来。并尝试猜测这个图片的含义。最多200个字。"
description, _ = await self._llm.generate_response_for_image(prompt, image_base64)
if description is None:
logger.warning("AI未能生成图片描述")
return "[图片]"
# 根据配置决定是否保存图片
if global_config.EMOJI_SAVE:
# 生成文件名和路径