Explorar o código

Update agent_service: refresh agent profile when get instance

StrayWarrior hai 5 meses
pai
achega
dfa808454e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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):
         """持续处理接收队列消息"""