fix:修复running memory 错误

This commit is contained in:
SengokuCola
2025-06-12 14:32:10 +08:00
parent 4504ded37d
commit efe633fdc9
8 changed files with 20 additions and 40 deletions

View File

@@ -376,9 +376,7 @@ class HeartFChatting:
if acquired and self._processing_lock.locked():
self._processing_lock.release()
async def _process_processors(
self, observations: List[Observation], running_memorys: List[Dict[str, Any]]
) -> tuple[List[InfoBase], Dict[str, float]]:
async def _process_processors(self, observations: List[Observation]) -> tuple[List[InfoBase], Dict[str, float]]:
# 记录并行任务开始时间
parallel_start_time = time.time()
logger.debug(f"{self.log_prefix} 开始信息处理器并行任务")
@@ -392,7 +390,7 @@ class HeartFChatting:
async def run_with_timeout(proc=processor):
return await asyncio.wait_for(
proc.process_info(observations=observations, running_memorys=running_memorys),
proc.process_info(observations=observations),
timeout=global_config.focus_chat.processor_max_time,
)
@@ -479,7 +477,7 @@ class HeartFChatting:
# 创建三个并行任务
action_modify_task = asyncio.create_task(modify_actions_task())
memory_task = asyncio.create_task(self.memory_activator.activate_memory(self.observations))
processor_task = asyncio.create_task(self._process_processors(self.observations, []))
processor_task = asyncio.create_task(self._process_processors(self.observations))
# 等待三个任务完成
_, running_memorys, (all_plan_info, processor_time_costs) = await asyncio.gather(