Browse Source

Update agent_service: refresh agent profile when get instance

StrayWarrior 2 months ago
parent
commit
dfa808454e
1 changed files with 3 additions and 1 deletions
  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):
         """持续处理接收队列消息"""