refactor(core): 适配核心数据获取与消息构建函数的异步调用
在数据库交互层异步化后,多个相关的数据获取和消息构建函数(如 `build_readable_messages`)也转为异步实现。本次提交在所有调用点添加了 `await` 关键字,以适应这一变化。 此外,本次提交还包含以下修复: - 在主动思考模块中增加了对规划器返回无效动作的检查,避免后续流程出错。 - 修正了日志记录中错误的上下文变量引用。
This commit is contained in:
@@ -133,7 +133,7 @@ class PlanFilter:
|
||||
)
|
||||
|
||||
prompt_template = await global_prompt_manager.get_prompt_async("proactive_planner_prompt")
|
||||
actions_before_now = get_actions_by_timestamp_with_chat(
|
||||
actions_before_now = await get_actions_by_timestamp_with_chat(
|
||||
chat_id=plan.chat_id,
|
||||
timestamp_start=time.time() - 3600,
|
||||
timestamp_end=time.time(),
|
||||
|
||||
Reference in New Issue
Block a user