Skip to content

Commit

Permalink
fix: replace from|to_chunk_id with from|to_chunk_index
Browse files Browse the repository at this point in the history
  • Loading branch information
lsorber committed Dec 3, 2024
1 parent b450fe3 commit 555648b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/raglite/_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def to_xml(self, index: int | None = None) -> str:
index_attribute = f' index="{index}"' if index is not None else ""
xml = "\n".join(
[
f'<document{index_attribute} id="{self.document.id}" from_chunk_id="{self.chunks[0].id}" to_chunk_id="{self.chunks[-1].id}">',
f'<document{index_attribute} id="{self.document.id}" from_chunk_index="{self.chunks[0].index}" to_chunk_index="{self.chunks[-1].index}">',
f"<source>{self.document.url if self.document.url else self.document.filename}</source>"
f"<span_heading>{escape(self.chunks[0].headings.strip())}</span_heading>"
f"<span_content>\n{escape(''.join(chunk.body for chunk in self.chunks).strip())}\n</span_content>",
Expand Down

0 comments on commit 555648b

Please sign in to comment.