Update mode_classical.py

This commit is contained in:
SengokuCola
2025-03-15 01:04:53 +08:00
parent 54aea97126
commit 419bd56e30

View File

@@ -11,10 +11,9 @@ class WillingManager:
async def _decay_reply_willing(self): async def _decay_reply_willing(self):
"""定期衰减回复意愿""" """定期衰减回复意愿"""
while True: while True:
await asyncio.sleep(3) await asyncio.sleep(1)
for chat_id in self.chat_reply_willing: for chat_id in self.chat_reply_willing:
# 每分钟衰减10%的回复意愿 self.chat_reply_willing[chat_id] = max(0, self.chat_reply_willing[chat_id] * 0.9)
self.chat_reply_willing[chat_id] = max(0, self.chat_reply_willing[chat_id] * 0.6)
def get_willing(self, chat_stream: ChatStream) -> float: def get_willing(self, chat_stream: ChatStream) -> float:
"""获取指定聊天流的回复意愿""" """获取指定聊天流的回复意愿"""
@@ -54,8 +53,6 @@ class WillingManager:
reply_probability = min(max((current_willing - 0.5),0.03)* config.response_willing_amplifier * 2,1) reply_probability = min(max((current_willing - 0.5),0.03)* config.response_willing_amplifier * 2,1)
reply_probability = reply_probability
# 检查群组权限(如果是群聊) # 检查群组权限(如果是群聊)
if chat_stream.group_info and config: if chat_stream.group_info and config:
@@ -65,9 +62,6 @@ class WillingManager:
if chat_stream.group_info.group_id in config.talk_frequency_down_groups: if chat_stream.group_info.group_id in config.talk_frequency_down_groups:
reply_probability = reply_probability / 3.5 reply_probability = reply_probability / 3.5
if is_mentioned_bot and sender_id == "1026294844":
reply_probability = 1
return reply_probability return reply_probability