jihuaqiang 2 settimane fa
parent
commit
79ded9c9ca

+ 1 - 1
tools/indentify/audio_identifier.py

@@ -291,7 +291,7 @@ class AudioIdentifier:
                 # 3. 生成
                 response = self.model.generate_content(
                     contents=[self.system_prompt, audio_file],
-                    request_options={'timeout': 500}
+                    request_options={'timeout': 2000}
                 )
 
                 # 尝试读取文本

+ 2 - 2
tools/indentify/video_identifier.py

@@ -98,7 +98,7 @@ class VideoIdentifier:
             # 尝试下载视频
             for attempt in range(3):
                 try:
-                    response = requests.get(url=video_url, timeout=60)
+                    response = requests.get(url=video_url, timeout=600)
                     if response.status_code == 200:
                         try:
                             with open(file_path, 'wb') as f:
@@ -415,7 +415,7 @@ class VideoIdentifier:
                     )
                     response = model.generate_content(
                         contents=[video_file, system_prompt],
-                        request_options={'timeout': 240}
+                        request_options={'timeout': 2000}
                     )
 
                     if hasattr(response, '_error') and response._error: