From 3bd3e3b30d70e18eb070f7a9f4d34eb67941b115 Mon Sep 17 00:00:00 2001 From: Giovanni Alzetta Date: Thu, 12 Sep 2024 11:37:33 +0200 Subject: [PATCH] nit: fixing value error in documentsplitter for split_by --- haystack/components/preprocessors/document_splitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haystack/components/preprocessors/document_splitter.py b/haystack/components/preprocessors/document_splitter.py index 7e0cbd6e54..4eb15aeec2 100644 --- a/haystack/components/preprocessors/document_splitter.py +++ b/haystack/components/preprocessors/document_splitter.py @@ -136,7 +136,7 @@ def _split_into_units( return self.splitting_function(text) else: raise NotImplementedError( - "DocumentSplitter only supports 'word', 'sentence', 'page' or 'passage' split_by options." + "DocumentSplitter only supports 'function', 'page', 'passage', 'sentence' or 'word' split_by options." ) units = text.split(self.split_at) # Add the delimiter back to all units except the last one