fix: 修复文档解析器中的后端参数设置
This commit is contained in:
parent
02c68a0ca5
commit
25584e366a
@ -12,8 +12,8 @@
|
|||||||
## Next
|
## Next
|
||||||
|
|
||||||
- [x] 修改现有的智能体Demo,并尽量将默认助手的特性兼容到 LangGraph 的 [`create_agent`](https://docs.langchain.com/oss/python/langchain/agents) 中
|
- [x] 修改现有的智能体Demo,并尽量将默认助手的特性兼容到 LangGraph 的 [`create_agent`](https://docs.langchain.com/oss/python/langchain/agents) 中
|
||||||
- [ ] 基于 create_agent 创建 SQL Viewer 智能体 <Badge type="info" text="0.3.5" />
|
- [x] 基于 create_agent 创建 SQL Viewer 智能体 <Badge type="info" text="0.3.5" />
|
||||||
- [ ] 优化 MCP 逻辑,支持 common + special 创建方式 <Badge type="info" text="0.3.5" />
|
- [x] 优化 MCP 逻辑,支持 common + special 创建方式 <Badge type="info" text="0.3.5" />
|
||||||
- [ ] 添加对于上传文件的支持
|
- [ ] 添加对于上传文件的支持
|
||||||
- [ ] 统一图谱数据结构,优化可视化方式 [#298](https://github.com/xerrors/Yuxi-Know/issues/298) <Badge type="info" text="0.4" />
|
- [ ] 统一图谱数据结构,优化可视化方式 [#298](https://github.com/xerrors/Yuxi-Know/issues/298) <Badge type="info" text="0.4" />
|
||||||
- [ ] 集成智能体评估,首先使用命令行来实现,然后考虑放在 UI 里面展示
|
- [ ] 集成智能体评估,首先使用命令行来实现,然后考虑放在 UI 里面展示
|
||||||
|
|||||||
@ -116,25 +116,14 @@ class MinerUParser(BaseDocumentProcessor):
|
|||||||
f"不支持的文件类型: {file_ext}", self.get_service_name(), "unsupported_file_type"
|
f"不支持的文件类型: {file_ext}", self.get_service_name(), "unsupported_file_type"
|
||||||
)
|
)
|
||||||
|
|
||||||
# 先检查服务健康状态
|
|
||||||
health = self.check_health()
|
|
||||||
if health["status"] != "healthy":
|
|
||||||
raise DocumentParserException(
|
|
||||||
f"MinerU 服务不可用: {health['message']}", self.get_service_name(), health["status"]
|
|
||||||
)
|
|
||||||
|
|
||||||
# 解析参数
|
# 解析参数
|
||||||
params = params or {}
|
params = params or {}
|
||||||
|
|
||||||
# 构建请求数据 - 只保留核心参数
|
# 构建请求数据 - 只保留核心参数
|
||||||
data = {
|
data = {
|
||||||
"lang_list": params.get("lang_list", ["ch"]),
|
"lang_list": params.get("lang_list", ["ch"]),
|
||||||
"backend": params.get("backend", "pipeline"),
|
"backend": params.get("backend", "vlm-http-client"),
|
||||||
"parse_method": params.get("parse_method", "auto"),
|
"parse_method": params.get("parse_method", "auto"),
|
||||||
"formula_enable": params.get("formula_enable", True),
|
|
||||||
"table_enable": params.get("table_enable", True),
|
|
||||||
"start_page_id": params.get("start_page_id", 0),
|
|
||||||
"end_page_id": params.get("end_page_id", 99999),
|
|
||||||
# 固定返回 markdown 格式
|
# 固定返回 markdown 格式
|
||||||
"return_md": True,
|
"return_md": True,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
<a-progress
|
<a-progress
|
||||||
:percent="Math.round(task.progress || 0)"
|
:percent="Math.round(task.progress || 0)"
|
||||||
:status="progressStatus(task.status)"
|
:status="progressStatus(task.status)"
|
||||||
stroke-width="6"
|
stroke-width=6
|
||||||
/>
|
/>
|
||||||
<!-- <span class="task-card-progress-value">{{ Math.round(task.progress || 0) }}%</span> -->
|
<!-- <span class="task-card-progress-value">{{ Math.round(task.progress || 0) }}%</span> -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -77,7 +77,7 @@
|
|||||||
:percent="getPercent(selectedChunk.data.score)"
|
:percent="getPercent(selectedChunk.data.score)"
|
||||||
:stroke-color="getScoreColor(selectedChunk.data.score)"
|
:stroke-color="getScoreColor(selectedChunk.data.score)"
|
||||||
:show-info="false"
|
:show-info="false"
|
||||||
stroke-width="6"
|
stroke-width=6
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="selectedChunk.data.rerank_score" class="score-card">
|
<div v-if="selectedChunk.data.rerank_score" class="score-card">
|
||||||
@ -87,7 +87,7 @@
|
|||||||
:percent="getPercent(selectedChunk.data.rerank_score)"
|
:percent="getPercent(selectedChunk.data.rerank_score)"
|
||||||
:stroke-color="getScoreColor(selectedChunk.data.rerank_score)"
|
:stroke-color="getScoreColor(selectedChunk.data.rerank_score)"
|
||||||
:show-info="false"
|
:show-info="false"
|
||||||
stroke-width="6"
|
stroke-width=6
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user