修改了willing的classical
This commit is contained in:
@@ -28,7 +28,6 @@ class WillingManager:
|
||||
|
||||
async def change_reply_willing_received(self,
|
||||
chat_stream: ChatStream,
|
||||
topic: str = None,
|
||||
is_mentioned_bot: bool = False,
|
||||
config = None,
|
||||
is_emoji: bool = False,
|
||||
@@ -37,14 +36,14 @@ class WillingManager:
|
||||
"""改变指定聊天流的回复意愿并返回回复概率"""
|
||||
chat_id = chat_stream.stream_id
|
||||
current_willing = self.chat_reply_willing.get(chat_id, 0)
|
||||
|
||||
if topic and current_willing < 1:
|
||||
current_willing += 0.2
|
||||
elif topic:
|
||||
current_willing += 0.05
|
||||
|
||||
interested_rate = interested_rate * config.response_interested_rate_amplifier
|
||||
|
||||
if interested_rate > 0.5:
|
||||
current_willing += (interested_rate - 0.5)
|
||||
|
||||
if is_mentioned_bot and current_willing < 1.0:
|
||||
current_willing += 0.9
|
||||
current_willing += 1
|
||||
elif is_mentioned_bot:
|
||||
current_willing += 0.05
|
||||
|
||||
@@ -53,7 +52,10 @@ class WillingManager:
|
||||
|
||||
self.chat_reply_willing[chat_id] = min(current_willing, 3.0)
|
||||
|
||||
reply_probability = (current_willing - 0.5) * 2
|
||||
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user