소스 검색

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")