From 227c852e677486563b69a9bc29d95faca9d0882e Mon Sep 17 00:00:00 2001 From: cambrianlee <53687180+cambrianlee@users.noreply.github.com> Date: Thu, 12 Mar 2026 15:23:55 +0800 Subject: [PATCH] Fix typo: documnet_keyword -> document_keyword in Chunk class (#13531) ### What problem does this PR solve? The Chunk class had a typo in the attribute name 'documnet_keyword', which caused the document_name field to remain empty when retrieving chunks via the SDK. This fix corrects the spelling to 'document_keyword'. Changes: - Line 36: Changed self.documnet_keyword to self.document_keyword - Line 52: Updated backward compatibility code to use self.document_keyword ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- sdk/python/ragflow_sdk/modules/chunk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/ragflow_sdk/modules/chunk.py b/sdk/python/ragflow_sdk/modules/chunk.py index 0f5bf596b..609cb2745 100644 --- a/sdk/python/ragflow_sdk/modules/chunk.py +++ b/sdk/python/ragflow_sdk/modules/chunk.py @@ -33,7 +33,7 @@ class Chunk(Base): self.create_timestamp = 0.0 self.dataset_id = None self.document_name = "" - self.documnet_keyword = "" + self.document_keyword = "" self.document_id = "" self.available = True # Additional fields for retrieval results @@ -49,7 +49,7 @@ class Chunk(Base): #for backward compatibility if not self.document_name: - self.document_name = self.documnet_keyword + self.document_name = self.document_keyword def update(self, update_message: dict):