fix: 更新MongoToSQLiteMigrator的唯一字段和验证设置
This commit is contained in:
@@ -198,8 +198,8 @@ class MongoToSQLiteMigrator:
|
|||||||
"status": "status",
|
"status": "status",
|
||||||
"timestamp": "timestamp",
|
"timestamp": "timestamp",
|
||||||
},
|
},
|
||||||
enable_validation=False, # 禁用数据验证
|
enable_validation=True, # 禁用数据验证"
|
||||||
unique_fields=["user_id", "timestamp"], # 组合唯一性
|
unique_fields=["user_id", "prompt_tokens","completion_tokens","total_tokens","cost"], # 组合唯一性
|
||||||
),
|
),
|
||||||
# 消息迁移配置
|
# 消息迁移配置
|
||||||
MigrationConfig(
|
MigrationConfig(
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class MessageProcessor:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _check_ban_words(text: str, chat, userinfo) -> bool:
|
def _check_ban_words(text: str, chat, userinfo) -> bool:
|
||||||
"""检查消息中是否包含过滤词"""
|
"""检查消息中是否包含过滤词"""
|
||||||
for word in global_config.chat.ban_words:
|
for word in global_config.message_receive.ban_words:
|
||||||
if word in text:
|
if word in text:
|
||||||
logger.info(
|
logger.info(
|
||||||
f"[{chat.group_info.group_name if chat.group_info else '私聊'}]{userinfo.user_nickname}:{text}"
|
f"[{chat.group_info.group_name if chat.group_info else '私聊'}]{userinfo.user_nickname}:{text}"
|
||||||
|
|||||||
Reference in New Issue
Block a user