Skip to content

Commit

Permalink
Fix typo in BasePGRetriever causing graph context to not be added (ru…
Browse files Browse the repository at this point in the history
  • Loading branch information
geodavic authored and jzhao62 committed Oct 4, 2024
1 parent b54b94f commit c613665
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ def _add_source_text(
mapped_node = og_node_map.get(node_with_score.node.ref_doc_id or "", None)

if mapped_node:
graph_content = graph_node_map.get(node.node_id, [])
graph_content = graph_node_map.get(mapped_node.node_id, [])
if len(graph_content) > 0:
graph_content_str = "\n".join(graph_content)
cur_content = node.get_content()
cur_content = mapped_node.get_content()
preamble_text = (
self._include_text_preamble
if self._include_text_preamble
Expand All @@ -105,7 +105,7 @@ def _add_source_text(
new_content = (
preamble_text + graph_content_str + "\n\n" + cur_content
)
mapped_node = TextNode(**node.dict())
mapped_node = TextNode(**mapped_node.dict())
mapped_node.text = new_content
result_nodes.append(
NodeWithScore(
Expand Down

0 comments on commit c613665

Please sign in to comment.