🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-07-01 05:46:54 +00:00
parent 0dad4a1d46
commit 087f4a6cbf
3 changed files with 52 additions and 49 deletions

View File

@@ -94,6 +94,7 @@ class RealTimeInfoProcessor(BaseProcessor):
)
from src.chat.message_receive.chat_stream import get_chat_manager
name = get_chat_manager().get_stream_name(self.subheartflow_id)
self.log_prefix = f"[{name}] 实时信息"
@@ -270,13 +271,15 @@ class RealTimeInfoProcessor(BaseProcessor):
info_type = content_json.get("info_type")
if info_type:
# 记录信息获取请求
self.info_fetching_cache.append({
self.info_fetching_cache.append(
{
"person_id": get_person_info_manager().get_person_id_by_person_name(sender),
"person_name": sender,
"info_type": info_type,
"start_time": time.time(),
"forget": False,
})
}
)
# 限制缓存大小
if len(self.info_fetching_cache) > 20:

View File

@@ -1,6 +1,5 @@
from src.chat.heart_flow.observation.chatting_observation import ChattingObservation
from src.chat.heart_flow.observation.observation import Observation
from src.llm_models.utils_model import LLMRequest
from src.config.config import global_config
import time
import traceback
@@ -446,6 +445,7 @@ class RelationshipBuildProcessor(BaseProcessor):
segments = self.person_engaged_cache[person_id]
# 异步执行关系构建
import asyncio
asyncio.create_task(self.update_impression_on_segments(person_id, self.subheartflow_id, segments))
# 移除已处理的用户缓存
del self.person_engaged_cache[person_id]