Răsfoiți Sursa

Merge branch 'dev' of http://47.109.151.80:15030/CRBC-MaaS-Platform-Project/LQAgentPlatform into dev

WangXuMing 2 luni în urmă
părinte
comite
c5b9881dad

+ 3 - 3
core/construction_review/component/doc_worker/docx_worker/text_splitter.py

@@ -458,9 +458,9 @@ class DocxTextSplitter(TextSplitter):
             "_sort_key": chunk_start_pos,
         }
 
-        # 如果找到了一级目录的分类信息,添加到chunk中
-        if chapter_classification:
-            chunk_data["chapter_classification"] = chapter_classification
+        # # 如果找到了一级目录的分类信息,添加到chunk中
+        # if chapter_classification:
+        #     chunk_data["chapter_classification"] = chapter_classification
 
         return chunk_data
 

+ 3 - 3
core/construction_review/component/doc_worker/pdf_worker/text_splitter.py

@@ -531,9 +531,9 @@ class PdfTextSplitter(TextSplitter):
             "_sort_key": chunk_start_pos,
         }
 
-        # 如果找到了一级目录的分类信息,添加到chunk中
-        if chapter_classification:
-            chunk_data["chapter_classification"] = chapter_classification
+        # # 如果找到了一级目录的分类信息,添加到chunk中
+        # if chapter_classification:
+        #     chunk_data["chapter_classification"] = chapter_classification
 
         return chunk_data
 

+ 1 - 0
core/construction_review/component/document_processor.py

@@ -486,6 +486,7 @@ class DocumentProcessor:
                             'content': content,
                             'section_label': metadata.get('section_label', ''),
                             'project_plan_type': metadata.get('project_plan_type', ''),
+                            'chapter_classification': metadata.get('chapter_classification', ''),
                             'element_tag': element_tag,
                             'chapter': metadata.get('section_label', f'第{chunk.get("page", 0)}页'),
                             'title': metadata.get('section_label', ''),