From 86f5a88db792c26094617f3c135a0078c9bfdcf1 Mon Sep 17 00:00:00 2001 From: Lukas Selch Date: Mon, 17 Feb 2025 15:20:23 +0100 Subject: [PATCH] Fixed wrong variable name --- lightrag/lightrag.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index 7b3e8605..2f7bb5e4 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -867,7 +867,7 @@ class LightRAG: chunk_entry = { "content": chunk_content.strip(), "source_id": source_id, - "tokens": len(encode_string_by_tiktoken(chunk_entry["content"])), + "tokens": len(encode_string_by_tiktoken(chunk_content.strip())), "chunk_order_id": 0, "full_doc_id": source_id, "status": DocStatus.PROCESSED