Unverified Commit 705720c9 authored by Xiaomeng Zhao's avatar Xiaomeng Zhao Committed by GitHub
Browse files

Merge pull request #1496 from opendatalab/dev

fix(llm_aided): add enable flag check for LLM aided optimizations 
parents 315ddbd3 dbc52530
...@@ -860,15 +860,18 @@ def pdf_parse_union( ...@@ -860,15 +860,18 @@ def pdf_parse_union(
"""公式优化""" """公式优化"""
formula_aided_config = llm_aided_config.get('formula_aided', None) formula_aided_config = llm_aided_config.get('formula_aided', None)
if formula_aided_config is not None: if formula_aided_config is not None:
llm_aided_formula(pdf_info_dict, formula_aided_config) if formula_aided_config.get('enable', False):
llm_aided_formula(pdf_info_dict, formula_aided_config)
"""文本优化""" """文本优化"""
text_aided_config = llm_aided_config.get('text_aided', None) text_aided_config = llm_aided_config.get('text_aided', None)
if text_aided_config is not None: if text_aided_config is not None:
llm_aided_text(pdf_info_dict, text_aided_config) if text_aided_config.get('enable', False):
llm_aided_text(pdf_info_dict, text_aided_config)
"""标题优化""" """标题优化"""
title_aided_config = llm_aided_config.get('title_aided', None) title_aided_config = llm_aided_config.get('title_aided', None)
if title_aided_config is not None: if title_aided_config is not None:
llm_aided_title(pdf_info_dict, title_aided_config) if title_aided_config.get('enable', False):
llm_aided_title(pdf_info_dict, title_aided_config)
"""dict转list""" """dict转list"""
pdf_info_list = dict_to_list(pdf_info_dict) pdf_info_list = dict_to_list(pdf_info_dict)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment