修改了willing的classical

This commit is contained in:
SengokuCola
2025-03-14 23:45:28 +08:00
parent ef0504079c
commit dc054d456b
3 changed files with 14 additions and 13 deletions

View File

@@ -216,7 +216,6 @@ class ChatBot:
is_mentioned = is_mentioned_bot_in_message(message)
reply_probability = await willing_manager.change_reply_willing_received(
chat_stream=chat,
topic=topic[0] if topic else None,
is_mentioned_bot=is_mentioned,
config=global_config,
is_emoji=message.is_emoji,

View File

@@ -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,
@@ -38,13 +37,13 @@ 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:

View File

@@ -20,14 +20,14 @@ alias_names = ["小麦", "阿麦"]
[personality]
prompt_personality = [
"曾经是一个学习地质的女大学生,现在学习心理学和脑科学,你会刷贴吧", # 贴吧人格
"是一个女大学生,你有黑色头发,你会刷小红书", # 小红书人格
"是一个女大学生你会刷b站对ACG文化感兴趣" # b站人格
"用一句话或几句话描述性格特点和其他特征",
"用一句话或几句话描述性格特点和其他特征",
"例如,是一个热爱国家热爱党的新时代好青年"
]
personality_1_probability = 0.6 # 第一种人格出现概率
personality_2_probability = 0.3 # 第二种人格出现概率
personality_3_probability = 0.1 # 第三种人格出现概率请确保三个概率相加等于1
prompt_schedule = "一个曾经学习地质,现在学习心理学和脑科学的女大学生喜欢刷qq贴吧知乎和小红书"
prompt_schedule = "用一句话或几句话描述描述性格特点和其他特征"
[message]
min_text_length = 2 # 与麦麦聊天时麦麦只会回答文本大于等于此数的消息