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: update error messages in fast_api.py for improved clarity and consistency
myhlolib78551af7c7b
diff --git a/mineru/cli/fast_api.py b/mineru/cli/fast_api.pyindex 4fa9b929..06c12a0d 100644--- a/mineru/cli/fast_api.py+++ b/mineru/cli/fast_api.py@@ -70,12 +70,12 @@ async def parse_pdf(except Exception as e:return JSONResponse(status_code=400,- content={"error": f"处理文件失败: {str(e)}"}+ content={"error": f"Failed to load file: {str(e)}"})else:return JSONResponse(status_code=400,- content={"error": f"不支持的文件类型: {file_path.suffix}"}+ content={"error": f"Unsupported file type: {file_path.suffix}"})@@ -159,7 +159,7 @@ async def parse_pdf(logger.exception(e)return JSONResponse(status_code=500,- content={"error": str(e)}+ content={"error": f"Failed to process file: {str(e)}"})