This commit is contained in:
SengokuCola
2025-04-30 17:50:47 +08:00
parent 7d19a6728f
commit 5963214d95
11 changed files with 108 additions and 94 deletions

View File

@@ -5,7 +5,6 @@ import time
from typing import Optional, List, Dict, Tuple, Callable, Coroutine
import traceback
from src.common.logger_manager import get_logger
import random
from src.plugins.chat.message import MessageRecv
from src.plugins.chat.chat_stream import chat_manager
import math
@@ -153,8 +152,6 @@ class InterestChatting:
"above_threshold": self.above_threshold,
}
# --- 新增后台更新任务相关方法 ---
async def _run_update_loop(self, update_interval: float = 1.0):
"""后台循环,定期更新兴趣和回复概率。"""
@@ -472,7 +469,7 @@ class SubHeartflow:
async def get_interest_state(self) -> dict:
return await self.interest_chatting.get_state()
def get_normal_chat_last_speak_time(self) -> float:
if self.normal_chat_instance:
return self.normal_chat_instance.last_speak_time