Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow subclassing of Document #8524

Open
tsoernes opened this issue Nov 8, 2024 · 0 comments
Open

Allow subclassing of Document #8524

tsoernes opened this issue Nov 8, 2024 · 0 comments

Comments

@tsoernes
Copy link

tsoernes commented Nov 8, 2024

I want to subclass Document. An issue arise when using built-in components that uses haystack.Document as type and the type checking that is performed in the pipeline:

PipelineConnectError: Cannot connect 'cleaner.documents' with 'empty_doc_remover.documents': their declared input and output types do not match.
'cleaner':
 - documents: List[Document]
'empty_doc_remover':
 - documents: list[Document] (available)

Describe the solution you'd like
Allow subclasses of Document by using issubclass()

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant