-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ExtractiveReader breaks if run with no documents #7878
Labels
Comments
Hey! This seems like a duplicate of #7731 (fixed in #7732). I am not able to reproduce it with the following code ( from haystack.components.readers import ExtractiveReader
reader = ExtractiveReader()
reader.warm_up()
res=reader.run(query="hello", documents=[]) Can you try updating Haystack? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
ExtractiveReader breaks if run with no documents
Error message
File "/home/rootuser/miniconda3/envs/xxxx/lib/python3.10/site-packages/haystack/components/readers/extractive.py", line 630, in run
answers = self._nest_answers(
File "/home/rootuser/miniconda3/envs/xxxx/lib/python3.10/site-packages/haystack/components/readers/extractive.py", line 391, in _nest_answers
current_answers = self.deduplicate_by_overlap(current_answers, overlap_threshold=overlap_threshold)
File "/home/rootuser/miniconda3/envs/xxxx/lib/python3.10/site-packages/haystack/components/readers/extractive.py", line 515, in deduplicate_by_overlap
deduplicated_answers = [answers[0]]
System:
The text was updated successfully, but these errors were encountered: