浏览代码

Update agent_service: random response type

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

+ 2 - 1
agent_service.py

@@ -153,7 +153,8 @@ class AgentService:
                     if len(recent_dialogue) < 2:
                         message_type = MessageType.TEXT
                     else:
-                        message_type = self.response_type_detector.detect_type(recent_dialogue[:-1], recent_dialogue[-1])
+                        message_type = self.response_type_detector.detect_type(
+                            recent_dialogue[:-1], recent_dialogue[-1], enable_random=True)
                     self._send_response(staff_id, user_id, resp, message_type)
             else:
                 logger.debug(f"staff[{staff_id}], user[{user_id}]: do not need response")