Haystack 2.0.1
โฌ๏ธ Upgrade Notes
-
The
HuggingFaceTGIGeneratorandHuggingFaceTGIChatGeneratorcomponents have been modified to be compatible withhuggingface_hub>=0.22.0.If you use these components, you may need to upgrade the
huggingface_hublibrary. To do this, run the following command in your environment:pip install "huggingface_hub>=0.22.0"
๐ New Features
- Adds
streaming_callbackparameter toHuggingFaceLocalGenerator, allowing users to handle streaming responses. - Introduce a new
SparseEmbeddingclass which can be used to store a sparse vector representation of a Document. It will be instrumental to support Sparse Embedding Retrieval with the subsequent introduction of Sparse Embedders and Sparse Embedding Retrievers.
โก๏ธ Enhancement Notes
-
Set
max_new_tokensdefault to 512 in Hugging Face generators. -
In Jupyter notebooks, the image of the Pipeline will no longer be displayed automatically. The textual representation of the Pipeline will be displayed.
To display the Pipeline image, use the
showmethod of the Pipeline object.
๐ Bug Fixes
- The
test_comparison_intest case in the base document store tests used to always pass, no matter how theinfiltering logic was implemented in document stores. With the fix, theinlogic is actually tested. Some tests might start to fail for document stores that don’t implement theinfilter correctly. - Put
HFTokenStreamingHandlerin a lazy import block inHuggingFaceLocalGenerator. This fixed some breaking core-integrations. - Fixes
Pipeline.run()logic so Components that have all their inputs with a default are run in the correct order. This happened we gather a list of Components to run internally when running the Pipeline in the order they are added during creation of the Pipeline. This caused some Components to run before they received all their inputs. - Fixes
HuggingFaceTEITextEmbedderreturning an embedding of incorrect shape when used with a Text-Embedding-Inference endpoint deployed using Docker. - Add the
@componentdecorator toHuggingFaceTGIChatGenerator. The lack of this decorator made it impossible to use theHuggingFaceTGIChatGeneratorin a pipeline.