Skip to content

Commit

Permalink
fix: metadata should not be included after sentence splitter (run-lla…
Browse files Browse the repository at this point in the history
  • Loading branch information
pserrer1 authored Aug 2, 2024
1 parent 62b874e commit 04b2f8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/real-seahorses-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@llamaindex/core": patch
---

Fix issue with metadata included after sentence splitter
2 changes: 1 addition & 1 deletion packages/core/src/node-parser/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export abstract class MetadataAwareTextSplitter extends TextSplitter {
return nodes.reduce<TextNode[]>((allNodes, node) => {
const metadataStr = this.getMetadataString(node);
const splits = this.splitTextMetadataAware(
node.getContent(MetadataMode.ALL),
node.getContent(MetadataMode.NONE),
metadataStr,
);
return allNodes.concat(buildNodeFromSplits(splits, node));
Expand Down

0 comments on commit 04b2f8e

Please sign in to comment.