From d639ce39721d7123907f759de0a5ce0695782cb9 Mon Sep 17 00:00:00 2001 From: Paul Lam Date: Wed, 27 Sep 2023 07:07:19 +0900 Subject: [PATCH] add paragraph_number to body nodes metadata --- mind_palace/docs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mind_palace/docs.py b/mind_palace/docs.py index 78218ee..f942180 100644 --- a/mind_palace/docs.py +++ b/mind_palace/docs.py @@ -60,6 +60,7 @@ def body(xml, doc_id): return [ TextNode( text=line, + metadata={"paragraph_number": index + 1}, id_=f"{doc_id}-body-paragraph-{index}", ) for index, line in enumerate(xml.body.split("\n"))