Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
fix: keep model output for client-side output generation
myhloli2d3fb59c672d
diff --git a/mineru/cli/api_request.py b/mineru/cli/api_request.pyindex 44f1381b..a90cb8d1 100644--- a/mineru/cli/api_request.py+++ b/mineru/cli/api_request.py@@ -161,7 +161,7 @@ async def parse_request_form(Form(description=("Defer final markdown/content-list generation to the client. "- "When enabled, the server returns staged middle JSON and images."+ "When enabled, the server returns staged middle JSON, model output, and images."),),] = False,@@ -188,7 +188,7 @@ async def parse_request_form(if client_side_output_generation:return_md = Falsereturn_middle_json = True- return_model_output = False+ return_model_output = Truereturn_content_list = Falsereturn_images = Truediff --git a/mineru/cli/client.py b/mineru/cli/client.pyindex 3ed3a28d..936df82e 100644--- a/mineru/cli/client.py+++ b/mineru/cli/client.py@@ -626,9 +626,8 @@ def build_request_form_data(image_analysis: bool = True,client_side_output_generation: bool = False,) -> dict[str, str | list[str]]:- # 开启客户端输出生成时,服务端只负责返回 middle json、图片和原文件。+ # 开启客户端输出生成时,只关闭客户端会重建的最终产物。return_md = not client_side_output_generation- return_model_output = not client_side_output_generationreturn_content_list = not client_side_output_generationreturn _api_client.build_parse_request_form_data(lang_list=[lang],@@ -642,7 +641,7 @@ def build_request_form_data(end_page_id=end_page_id,return_md=return_md,return_middle_json=True,- return_model_output=return_model_output,+ return_model_output=True,return_content_list=return_content_list,return_images=True,response_format_zip=True,diff --git a/mineru/cli/gradio_app.py b/mineru/cli/gradio_app.pyindex 509a3095..e305d69f 100644--- a/mineru/cli/gradio_app.py+++ b/mineru/cli/gradio_app.py@@ -997,7 +997,7 @@ async def _run_to_markdown_job(end_page_id=end_pages - 1,return_md=not use_client_side_output_generation,return_middle_json=True,- return_model_output=not use_client_side_output_generation,+ return_model_output=True,return_content_list=not use_client_side_output_generation,return_images=True,response_format_zip=True,