Describe the bug
The sources parameter for both LibreOfficeFileConverter.run and run_async is typed as Iterable[str | Path | ByteStream]
This prevents valid Haystack pipelines from connecting components such as FileTypeRouter, which outputs list[str | Path | ByteStream]
Haystack considers these socket types incompatible even though the converter accepts lists at runtime. LibreOfficeFileConverter should use list[str | Path | ByteStream], consistent with other Haystack file converters.
To Reproduce
from pathlib import Path
from haystack import Pipeline
from haystack.components.routers import FileTypeRouter
from haystack_integrations.components.converters.libreoffice import LibreOfficeFileConverter
pipeline = Pipeline()
pipeline.add_component("file_type_router", FileTypeRouter(mime_types=["application/msword"]))
pipeline.add_component("libreoffice", LibreOfficeFileConverter(output_file_type="docx"))
pipeline.connect("file_type_router.application/msword", "libreoffice.sources")
Describe your environment (please complete the following information):
- OS: Linux
- Haystack version: 3.0.0
- Integration version: 1.0.0
Describe the bug
The sources parameter for both LibreOfficeFileConverter.run and run_async is typed as
Iterable[str | Path | ByteStream]This prevents valid Haystack pipelines from connecting components such as
FileTypeRouter, which outputslist[str | Path | ByteStream]Haystack considers these socket types incompatible even though the converter accepts lists at runtime.
LibreOfficeFileConvertershould uselist[str | Path | ByteStream], consistent with other Haystack file converters.To Reproduce
Describe your environment (please complete the following information):