Forráskód Böngészése

Update agent_service: support link and mini_program

StrayWarrior 6 órája
szülő
commit
f8099b8879
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      pqai_agent/agent_service.py

+ 2 - 1
pqai_agent/agent_service.py

@@ -358,7 +358,8 @@ class AgentService:
     def send_multimodal_response(self, staff_id, user_id, response: Dict, skip_check=False):
         message_type = response["type"]
         logger.warning(f"staff[{staff_id}] user[{user_id}]: response[{message_type}] {response}")
-        if message_type not in (MessageType.TEXT, MessageType.IMAGE_QW, MessageType.VOICE):
+        if message_type not in (MessageType.TEXT, MessageType.IMAGE_QW, MessageType.VOICE,
+                                MessageType.LINK, MessageType.MINI_PROGRAM):
             logger.error(f"staff[{staff_id}] user[{user_id}]: unsupported message type {message_type}")
             return
         if not skip_check and not self.can_send_to_user(staff_id, user_id):