Skip to content

Commit

Permalink
bugfix: Duplicated citation nodes (#17440)
Browse files Browse the repository at this point in the history
  • Loading branch information
minmie authored Jan 10, 2025
1 parent 6450228 commit 935b14e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ def _create_citation_nodes(self, nodes: List[NodeWithScore]) -> List[NodeWithSco
text = f"Source {len(new_nodes) + 1}:\n{text_chunk}\n"

new_node = NodeWithScore(
node=TextNode.model_validate(node.node), score=node.score
node=TextNode.model_validate(node.node.model_dump()),
score=node.score,
)
new_node.node.set_content(text)
new_nodes.append(new_node)
Expand Down

0 comments on commit 935b14e

Please sign in to comment.