Skip to content

LibreOfficeFileConverter sources type should be list instead of Iterable #3832

Description

@maxdswain

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions