jihuaqiang 2 tuần trước cách đây
mục cha
commit
f53a1b6d26
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      utils/google_ai_analyze.py

+ 4 - 1
utils/google_ai_analyze.py

@@ -115,6 +115,8 @@ class GoogleAI(object):
                 contents=[video, prompt],
                 request_options={'timeout': 300}
             )
+
+            logger.info(f"[视频分析] 响应: {response}")
             
             if hasattr(response, '_error') and response._error:
                 raise Exception(f"生成错误: {response._error}")
@@ -151,9 +153,10 @@ class GoogleAI(object):
                 genai.delete_file(name=video.name)
                 os.remove(video_path)
                 return "[异常] 上传视频失败", ""
-            
+            logger.info(f"[内容分析] 文件下载完成: {video_path}")
             prompts = load_prompts()
             analysis_data = {}
+
             for prompt in prompts[:3]:
                 # print(f"[分析] 正在执行: {prompt['name']}")
                 try: