pdf解析现在缓存翻译前的结果
This commit is contained in:
@@ -74,12 +74,12 @@ class MarkdownBasedWorkflow(Workflow[MarkdownBasedWorkflowConfig, Document, Mark
|
|||||||
converter = converter_class(convert_config)
|
converter = converter_class(convert_config)
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"不存在{convert_engin}解析引擎")
|
raise ValueError(f"不存在{convert_engin}解析引擎")
|
||||||
document_md = converter.convert(self.document_original)
|
document_md :Document= converter.convert(self.document_original)
|
||||||
if hasattr(converter,"attachments"):
|
if hasattr(converter,"attachments"):
|
||||||
for attachment in converter.attachments:
|
for attachment in converter.attachments:
|
||||||
self.attachment.add_attachment(attachment)
|
self.attachment.add_attachment(attachment)
|
||||||
# 获取缓存解析后文件
|
# 缓存解析后文件
|
||||||
md_based_convert_cacher.cache_result(document_md, self.document_original, convert_engin, convert_config)
|
md_based_convert_cacher.cache_result(document_md.copy(), self.document_original, convert_engin, convert_config)
|
||||||
|
|
||||||
return document_md
|
return document_md
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user