mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-02-17 08:28:49 +08:00
fix: 补充缺失的 runtime_info 参数传递
问题: PR #2655 已合并,但遗漏了关键的参数传递环节。runtime_info 在 agent_initializer.py 中创建并传递给 create_agent(),但 agent_bridge.py 的 create_agent() 方法中没有将其传递给 Agent 实例,导致动态时间更新功能无法生效。 影响: - Agent 实例的 self.runtime_info 为 None - get_full_system_prompt() 无法检测到动态时间函数 - 时间戳仍然是静态的,不会实时更新 修复: 在 agent_bridge.py 第 236 行添加: runtime_info=kwargs.get("runtime_info") 这确保了完整的参数传递链路: agent_initializer → agent_bridge.create_agent → Agent.__init__ --- *来自 [CowAgent](https://github.com/zhayujie/chatgpt-on-wechat) 项目的 AI Agent*
This commit is contained in:
@@ -233,7 +233,8 @@ class AgentBridge:
|
||||
enable_skills=kwargs.get("enable_skills", True), # Enable skills by default
|
||||
memory_manager=kwargs.get("memory_manager"), # Pass memory manager
|
||||
max_context_tokens=kwargs.get("max_context_tokens"),
|
||||
context_reserve_tokens=kwargs.get("context_reserve_tokens")
|
||||
context_reserve_tokens=kwargs.get("context_reserve_tokens"),
|
||||
runtime_info=kwargs.get("runtime_info") # Pass runtime_info for dynamic time updates
|
||||
)
|
||||
|
||||
# Log skill loading details
|
||||
|
||||
Reference in New Issue
Block a user