Skip to content

Commit c8cb4ed

Browse files
committed
Merge branch 'main' of https://github.com/xerrors/Yuxi-Know
2 parents 610b60e + 77987f8 commit c8cb4ed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/plugins/paddlex_parser.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,19 @@ def process_file(self, file_path: str, params: dict | None = None) -> str:
244244
# 检查API调用是否成功
245245
if api_result.get("errorCode") != 0:
246246
raise DocumentParserException(
247-
f"PP-StructureV3 API错误: {api_result.get('errorMsg', '未知错误')}", self.get_service_name(), "api_error"
247+
f"PP-StructureV3 API错误: {api_result.get('errorMsg', '未知错误')}",
248+
self.get_service_name(),
249+
"api_error",
248250
)
249251

250252
# 解析结果
251253
result = self._parse_api_result(api_result, file_path)
252254
text = result.get("full_text", "")
253255

254256
processing_time = time.time() - start_time
255-
logger.info(f"PP-StructureV3 处理成功: {os.path.basename(file_path)} - {len(text)} 字符 ({processing_time:.2f}s)")
257+
logger.info(
258+
f"PP-StructureV3 处理成功: {os.path.basename(file_path)} - {len(text)} 字符 ({processing_time:.2f}s)"
259+
)
256260

257261
# 记录统计信息
258262
summary = result.get("summary", {})

0 commit comments

Comments
 (0)