소스 검색

Fix response_type_detector: no voice for None

StrayWarrior 5 달 전
부모
커밋
928fbd0037
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      pqai_agent/response_type_detector.py

+ 2 - 0
pqai_agent/response_type_detector.py

@@ -75,6 +75,8 @@ class ResponseTypeDetector:
 
     @staticmethod
     def if_message_suitable_for_voice(message):
+        if not message:
+            return False
         # 使用语音的文字不适合过长
         if len(message) > 50:
             return False