feat:超时也强制引用回复(非llm判定时)

pull/1477/head
SengokuCola 2026-01-03 14:38:11 +08:00
parent 3c4fdbecd1
commit 3af8ee5cb6
1 changed files with 2 additions and 2 deletions

View File

@ -545,9 +545,9 @@ class HeartFChatting:
new_message_count = message_api.count_new_messages( new_message_count = message_api.count_new_messages(
chat_id=self.chat_stream.stream_id, start_time=self.last_read_time, end_time=time.time() chat_id=self.chat_stream.stream_id, start_time=self.last_read_time, end_time=time.time()
) )
need_reply = new_message_count >= random.randint(2, 3) need_reply = new_message_count >= random.randint(2, 3) or time.time() - self.last_read_time > 90
if need_reply: if need_reply:
logger.info(f"{self.log_prefix} 从思考到回复,共有{new_message_count}条新消息,使用引用回复") logger.info(f"{self.log_prefix} 从思考到回复,共有{new_message_count}条新消息,使用引用回复或者上次回复时间超过90秒")
reply_text = "" reply_text = ""
first_replied = False first_replied = False