|
@@ -75,7 +75,7 @@ class ContentIdentifier:
|
|
|
content_sql = f"""
|
|
|
SELECT id, formatted_content
|
|
|
FROM knowledge_search_content
|
|
|
- WHERE recognition_status = 0
|
|
|
+ WHERE recognition_status = 3
|
|
|
AND query_word IN ({placeholders})
|
|
|
LIMIT 1
|
|
|
"""
|
|
@@ -173,8 +173,8 @@ class ContentIdentifier:
|
|
|
# self.logger.info(f" 多模态识别: {record['multimodal_recognition'][:300]}...")
|
|
|
|
|
|
# 先设置这条记录的 recognition_status = 1
|
|
|
- self.db.update_values(f"UPDATE knowledge_search_content SET recognition_status = 3 WHERE id = {record['id']}")
|
|
|
-
|
|
|
+ self.db.update_values(f"UPDATE knowledge_search_content SET recognition_status = 1 WHERE id = {record['id']}")
|
|
|
+
|
|
|
# 解析 formatted_content
|
|
|
formatted_content = self.parse_formatted_content(record['formatted_content'])
|
|
|
|
|
@@ -212,6 +212,7 @@ class ContentIdentifier:
|
|
|
|
|
|
if video_upload_failed:
|
|
|
self.logger.info(f"记录 {record['id']} 识别失败,将 recognition_status 设置为 3")
|
|
|
+ self.db.update_values(f"UPDATE knowledge_search_content SET recognition_status = 3 WHERE id = {record['id']}")
|
|
|
return False
|
|
|
|
|
|
|