|
@@ -96,6 +96,7 @@ class GoogleAI(object):
|
|
|
|
|
|
@classmethod
|
|
|
def _analyze_content(cls, video, prompt):
|
|
|
+ logger.info(f"[视频分析] 开始分析, 视频: {video}, 提示: {prompt}")
|
|
|
"""增强版内容分析"""
|
|
|
model = genai.GenerativeModel(
|
|
|
model_name='gemini-2.0-flash',
|
|
@@ -116,12 +117,12 @@ class GoogleAI(object):
|
|
|
request_options={'timeout': 300}
|
|
|
)
|
|
|
|
|
|
- logger.info(f"[视频分析] 响应: {response}")
|
|
|
|
|
|
if hasattr(response, '_error') and response._error:
|
|
|
raise Exception(f"生成错误: {response._error}")
|
|
|
|
|
|
result = orjson.loads(response.text.strip())
|
|
|
+ logger.info(f"[视频分析] 响应: {result}")
|
|
|
print(f"[视频分析] 响应: {result}")
|
|
|
if not isinstance(result, dict):
|
|
|
raise ValueError("响应格式错误:非字典结构")
|