mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-30 14:04:27 +00:00
removed unnecessary hasattr check
This commit is contained in:
parent
627abcd082
commit
284eabe1f7
@ -188,11 +188,7 @@ class DocumentConverter:
|
|||||||
|
|
||||||
def _get_pipeline_options_hash(self, pipeline_options: PipelineOptions) -> str:
|
def _get_pipeline_options_hash(self, pipeline_options: PipelineOptions) -> str:
|
||||||
"""Generate a hash of pipeline options to use as part of the cache key."""
|
"""Generate a hash of pipeline options to use as part of the cache key."""
|
||||||
options_str = str(
|
options_str = str(pipeline_options.model_dump())
|
||||||
pipeline_options.model_dump()
|
|
||||||
if hasattr(pipeline_options, "model_dump")
|
|
||||||
else pipeline_options
|
|
||||||
)
|
|
||||||
return hashlib.md5(options_str.encode("utf-8")).hexdigest()
|
return hashlib.md5(options_str.encode("utf-8")).hexdigest()
|
||||||
|
|
||||||
def initialize_pipeline(self, format: InputFormat):
|
def initialize_pipeline(self, format: InputFormat):
|
||||||
|
Loading…
Reference in New Issue
Block a user