浏览代码

Update agent_service: refresh agent profile when get instance

StrayWarrior 4 月之前
父节点
当前提交
dfa808454e
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      pqai_agent/agent_service.py

+ 3 - 1
pqai_agent/agent_service.py

@@ -141,7 +141,9 @@ class AgentService:
         if agent_key not in self.agent_registry:
             self.agent_registry[agent_key] = DialogueManager(
                 staff_id, user_id, self.user_manager, self.agent_state_cache)
-        return self.agent_registry[agent_key]
+        agent = self.agent_registry[agent_key]
+        agent.refresh_profile()
+        return agent
 
     def process_messages(self):
         """持续处理接收队列消息"""