MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / __init__

Method __init__

docling/document_converter.py:159–175  ·  view source on GitHub ↗
(
        self,
        allowed_formats: Optional[List[InputFormat]] = None,
        format_options: Optional[Dict[InputFormat, FormatOption]] = None,
    )

Source from the content-addressed store, hash-verified

157 _default_download_filename = "file"
158
159 def __init__(
160 self,
161 allowed_formats: Optional[List[InputFormat]] = None,
162 format_options: Optional[Dict[InputFormat, FormatOption]] = None,
163 ):
164 self.allowed_formats = (
165 allowed_formats if allowed_formats is not None else [e for e in InputFormat]
166 )
167 self.format_to_options = {
168 format: (
169 _get_default_option(format=format)
170 if (custom_option := (format_options or {}).get(format)) is None
171 else custom_option
172 )
173 for format in self.allowed_formats
174 }
175 self.initialized_pipelines: Dict[Type[BasePipeline], BasePipeline] = {}
176
177 def initialize_pipeline(self, format: InputFormat):
178 """Initialize the conversion pipeline for the selected format."""

Callers

nothing calls this directly

Calls 1

_get_default_optionFunction · 0.70

Tested by

no test coverage detected