Skip to content

Commit

Permalink
fix: reverting refactor that broke `MultipleChunkRetrieverQA_combine_…
Browse files Browse the repository at this point in the history
…input_texts`
  • Loading branch information
FelixFehse committed Jul 2, 2024
1 parent 64af939 commit 50abf89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
...

### Fixes
...
- Reverted a bug introduced in `MultipleChunkRetrieverQa` text highlighting.

### Deprecations
...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,10 @@ def _combine_input_texts(
start_indices: list[int] = []
combined_text = ""
for i, chunk in enumerate(chunks):
combined_text += source_appendix.format(i=i + 1)
start_indices.append(len(combined_text))

c = source_appendix.format(i=i + 1)
c += chunk + "\n\n"
c = c.strip()
if i != 0:
c = " " + c
combined_text += c
return (TextChunk(combined_text), start_indices)
combined_text += chunk + "\n\n"
return (TextChunk(combined_text.strip()), start_indices)

@staticmethod
def _get_highlights_per_chunk(
Expand Down

0 comments on commit 50abf89

Please sign in to comment.