Prechádzať zdrojové kódy

v0.0.5-debug
- 移除调试保存'temp/filtered_chunks/chapter_chunks_map.json'

WangXuMing 1 mesiac pred
rodič
commit
1bed752b20

+ 2 - 2
core/construction_review/component/ai_review_engine.py

@@ -255,8 +255,8 @@ class AIReviewEngine(BaseReviewer):
             # 确保目录存在
             os.makedirs("temp/ai_review_engine", exist_ok=True)
 
-            with open("temp/ai_review_engine/enhance_with_parent_docs_grouped.json", "w", encoding='utf-8') as f:
-                json.dump(enhancement_result, f, ensure_ascii=False, indent=4)
+            # with open("temp/ai_review_engine/enhance_with_parent_docs_grouped.json", "w", encoding='utf-8') as f:
+            #     json.dump(enhancement_result, f, ensure_ascii=False, indent=4)
             logger.info(f"[RAG增强] ✅ 已保存分组增强结果到 temp/ai_review_engine/enhance_with_parent_docs_grouped.json")
             logger.info(f"[RAG增强] 分组增强完成: {enhanced_pairs}/{total_pairs} 个查询对进行了增强")
             logger.info(f"[RAG增强] 成功增强 {enhanced_count} 个结果,使用了 {len(enhancement_result['parent_docs'])} 个父文档")

+ 2 - 2
core/construction_review/component/document_processor.py

@@ -530,8 +530,8 @@ class DocumentProcessor:
             if is_smart_processing:
                 result['outline'] = self._create_outline_from_toc(raw_content.get('toc_info', {}))
 
-            with open(rf"temp\document_temp\文档切分预处理结果.json", 'w', encoding='utf-8') as f:
-                json.dump(result, f, ensure_ascii=False, indent=4)
+            # with open(rf"temp\document_temp\文档切分预处理结果.json", 'w', encoding='utf-8') as f:
+            #     json.dump(result, f, ensure_ascii=False, indent=4)
             return result
 
         except Exception as e:

+ 2 - 2
core/construction_review/workflows/ai_review_workflow.py

@@ -334,8 +334,8 @@ class AIReviewWorkflow:
             all_issues = []
             completed_chunks = 0
             chapter_chunks_map, chapter_names = self.core_fun._group_chunks_by_chapter(filtered_chunks)
-            with open("temp/filtered_chunks/chapter_chunks_map.json", "w", encoding="utf-8") as f:
-                 json.dump(chapter_chunks_map, f, ensure_ascii=False, indent=4)
+            # with open("temp/filtered_chunks/chapter_chunks_map.json", "w", encoding="utf-8") as f:
+            #      json.dump(chapter_chunks_map, f, ensure_ascii=False, indent=4)
             logger.info(f"内容分组完成,共 {len(chapter_chunks_map)} 个章节")
             await self.core_fun._send_start_review_progress(state,total_chunks, chapter_names)
             # 6️ 按章节处理