better:更清晰的子心流停用逻辑

This commit is contained in:
SengokuCola
2025-04-26 13:25:35 +08:00
parent 510aa7a12d
commit 14157bdab2
9 changed files with 162 additions and 185 deletions

View File

@@ -138,7 +138,7 @@ class HeartFCProcessor:
group_info=groupinfo,
)
subheartflow = await heartflow.create_subheartflow(chat.stream_id)
subheartflow = await heartflow.get_or_create_subheartflow(chat.stream_id)
message.update_chat_stream(chat)
await message.process()
@@ -166,9 +166,8 @@ class HeartFCProcessor:
# 6. 兴趣度计算与更新
interested_rate, is_mentioned = await self._calculate_interest(message)
current_time = time.time()
await subheartflow.interest_chatting.increase_interest(current_time, value=interested_rate)
await subheartflow.add_interest_dict_entry(message, interested_rate, is_mentioned)
await subheartflow.interest_chatting.increase_interest(value=interested_rate)
await subheartflow.interest_chatting.add_interest_dict(message, interested_rate, is_mentioned)
# 7. 日志记录
mes_name = chat.group_info.group_name if chat.group_info else "私聊"

View File

@@ -63,7 +63,6 @@ def init_prompt():
- 话题无关/无聊/不感兴趣
- 最后一条消息是你自己发的且无人回应你
- 讨论你不懂的专业话题
- 讨论你不想参与的话题
- 你发送了太多消息
2. 文字回复(text_reply)适用: