Sfoglia il codice sorgente

Update response_type_detector

StrayWarrior 1 mese fa
parent
commit
88ddc4c2ab
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      response_type_detector.py

+ 3 - 1
response_type_detector.py

@@ -55,7 +55,9 @@ class ResponseTypeDetector:
         if response == '语音':
             return MessageType.VOICE
         if enable_random:
-            if self.if_message_suitable_for_voice(next_message):
+            suitable_for_voice = self.if_message_suitable_for_voice(next_message)
+            logger.debug(f"voice suitable[{suitable_for_voice}], message: {next_message}")
+            if suitable_for_voice:
                 if random.random() < 0.2:
                     logger.info(f"enable voice response randomly for message: {next_message}")
                     return MessageType.VOICE