fix:优化日志

This commit is contained in:
SengokuCola
2025-04-18 11:29:57 +08:00
parent 74aa682f2b
commit 4dc9907fbd
5 changed files with 33 additions and 23 deletions

View File

@@ -340,7 +340,7 @@ def random_remove_punctuation(text: str) -> str:
def process_llm_response(text: str) -> List[str]:
# 先保护颜文字
protected_text, kaomoji_mapping = protect_kaomoji(text)
logger.debug(f"保护颜文字后的文本: {protected_text}")
logger.trace(f"保护颜文字后的文本: {protected_text}")
# 提取被 () 或 [] 包裹的内容
pattern = re.compile(r"[\(\[\].*?[\)\]\]")
# _extracted_contents = pattern.findall(text)

View File

@@ -112,7 +112,7 @@ class ImageManager:
# 查询缓存的描述
cached_description = self._get_description_from_db(image_hash, "emoji")
if cached_description:
logger.debug(f"缓存表情包描述: {cached_description}")
# logger.debug(f"缓存表情包描述: {cached_description}")
return f"[表情包:{cached_description}]"
# 调用AI获取描述