-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat: Create TransformersTextRouter
based on HF TextClassification pipeline
#7753
Comments
Hi, there is some demand for a |
Not quite, since the goal of the While technically it would be possible to use the I think it makes sense to have a component that can directly work on Text to perform this routing so we can skip the What do you think? |
Makes sense! Thanks @sjrl |
Adding a new component |
No worries, this isn't something we need urgently, but within the next quarter. I'd be happy to open PR once I have some free time to work on this :) |
Is your feature request related to a problem? Please describe.
Recently we half ported over this component from v1 with this PR. By this I mean previously the
TransformerQueryClassifier
worked both the the ZeroShotClassification pipeline from HF and the TextClassification pipeline from HF.However, to follow the philosophy of Haystack v2 we decided to split up this old component into two new ones, the
TransformersZeroShotTextRouter
(based on the ZeroShotClassification pipeline) and the yet to be madeTransformersTextRouter
(based on the TextClassification pipeline).Describe the solution you'd like
A new Router called
TransformersTextRouter
based on the TextClassification pipeline.Additional context
This would allow a query routing based on text classification which the Sol team actively uses to build pipelines in Haystack V1 for clients (e.g. prompt injection classification). Therefore, to ease the transition to v2 for clients it would be great to add this component.
The text was updated successfully, but these errors were encountered: