From 0730140e6284f636865c7ecdd52b86ee5de2e21b Mon Sep 17 00:00:00 2001 From: Andy Garvin Date: Tue, 25 Jun 2024 10:59:16 -0500 Subject: [PATCH] fix: include node relationships when converting jsonToDoc (#968) --- .changeset/pink-keys-kiss.md | 5 +++++ packages/llamaindex/src/storage/docStore/utils.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/pink-keys-kiss.md diff --git a/.changeset/pink-keys-kiss.md b/.changeset/pink-keys-kiss.md new file mode 100644 index 0000000000..f49d6d58ce --- /dev/null +++ b/.changeset/pink-keys-kiss.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +include node relationships when converting jsonToDoc diff --git a/packages/llamaindex/src/storage/docStore/utils.ts b/packages/llamaindex/src/storage/docStore/utils.ts index ca12907684..5968bfc490 100644 --- a/packages/llamaindex/src/storage/docStore/utils.ts +++ b/packages/llamaindex/src/storage/docStore/utils.ts @@ -44,6 +44,7 @@ export function jsonToDoc(docDict: DocJson): BaseNode { id_: dataDict.id_, hash: dataDict.hash, metadata: dataDict.metadata, + relationships: dataDict.relationships, }); } else { throw new Error(`Unknown doc type: ${docType}`);