|
|
@@ -219,6 +219,26 @@ async def convert_to_markdown(
|
|
|
form_data.add_field('response_format_zip', str(response_format_zip).lower())
|
|
|
form_data.add_field('formula_enable', str(formula_enable).lower())
|
|
|
|
|
|
+ # 格式化并记录调用参数(中英文对照)
|
|
|
+ params_log = {
|
|
|
+ "return_middle_json (返回中间JSON)": str(return_middle_json).lower(),
|
|
|
+ "return_model_output (返回模型输出)": str(return_model_output).lower(),
|
|
|
+ "return_md (返回Markdown)": str(return_md).lower(),
|
|
|
+ "return_images (返回图片)": str(return_images).lower(),
|
|
|
+ "end_page_id (结束页码)": str(end_page_id),
|
|
|
+ "parse_method (解析方法)": parse_method,
|
|
|
+ "start_page_id (起始页码)": str(start_page_id),
|
|
|
+ "lang_list (语言列表)": language,
|
|
|
+ "output_dir (输出目录)": "./output",
|
|
|
+ "server_url (服务器URL)": server_url,
|
|
|
+ "return_content_list (返回内容列表)": str(return_content_list).lower(),
|
|
|
+ "backend (处理后端)": backend,
|
|
|
+ "table_enable (启用表格识别)": str(table_enable).lower(),
|
|
|
+ "response_format_zip (响应格式ZIP)": str(response_format_zip).lower(),
|
|
|
+ "formula_enable (启用公式识别)": str(formula_enable).lower(),
|
|
|
+ }
|
|
|
+ logger.info(f"MinerU API 调用参数:\n{json.dumps(params_log, indent=4, ensure_ascii=False)}")
|
|
|
+
|
|
|
# 打开文件并添加到表单数据(文件会在请求发送时读取)
|
|
|
file_obj = open(input_file, 'rb')
|
|
|
try:
|