fix: 紧急为check功能加入开关

This commit is contained in:
tcmofashi
2025-03-07 03:12:35 +08:00
parent ead9b8cfe4
commit a3b8a545af
3 changed files with 11 additions and 7 deletions

View File

@@ -291,13 +291,14 @@ class EmojiManager:
# 获取表情包的描述
discription = await self._get_emoji_discription(image_base64)
check = await self._check_emoji(image_base64)
if '' not in check:
os.remove(image_path)
logger.info(f"描述: {discription}")
logger.info(f"其不满足过滤规则,被剔除 {check}")
continue
logger.info(f"check通过 {check}")
if global_config.EMOJI_CHECK:
check = await self._check_emoji(image_base64)
if '' not in check:
os.remove(image_path)
logger.info(f"描述: {discription}")
logger.info(f"其不满足过滤规则,被剔除 {check}")
continue
logger.info(f"check通过 {check}")
embedding = get_embedding(discription)
if discription is not None:
# 准备数据库记录