Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

Fix:Error code:500,param:Request timed out, please try again later.

黄泳凯cbc14bfe1d8b
diff --git a/mineru/utils/llm_aided.py b/mineru/utils/llm_aided.py
index 31ebd152..c4325c8e 100644
--- a/mineru/utils/llm_aided.py
+++ b/mineru/utils/llm_aided.py
@@ -85,8 +85,12 @@ Corrected title list:
messages=[
{'role': 'user', 'content': title_optimize_prompt}],
temperature=0.7,
+ stream=True,
)
- content = completion.choices[0].message.content.strip()
+ content = ""
+ for chunk in completion:
+ if chunk.choices:
+ content += chunk.choices[0].delta.content
# logger.info(f"Title completion: {content}")
if "</think>" in content:
idx = content.index("</think>") + len("</think>")