RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix:Discrepancy between Document.list_chunks() API documentation and implementation (#7575)
Stephen Huad412380cbba
diff --git a/api/apps/sdk/doc.py b/api/apps/sdk/doc.pyindex a71cc7328e..f76065c1cd 100644--- a/api/apps/sdk/doc.py+++ b/api/apps/sdk/doc.py@@ -856,6 +856,12 @@ def list_chunks(tenant_id, dataset_id, document_id):required: falsedefault: 30description: Number of items per page.+ - in: query+ name: id+ type: string+ required: false+ default: ""+ description: Chunk Id.- in: headername: Authorizationtype: stringdiff --git a/sdk/python/ragflow_sdk/modules/document.py b/sdk/python/ragflow_sdk/modules/document.pyindex 60a6e064bb..187d089012 100644--- a/sdk/python/ragflow_sdk/modules/document.py+++ b/sdk/python/ragflow_sdk/modules/document.py@@ -66,8 +66,8 @@ class Document(Base):except json.JSONDecodeError:return res.content- def list_chunks(self, page=1, page_size=30, keywords=""):- data = {"keywords": keywords, "page": page, "page_size": page_size}+ def list_chunks(self, page=1, page_size=30, keywords="", id = ""):+ data = {"keywords": keywords, "page": page, "page_size": page_size, "id": id}res = self.get(f'/datasets/{self.dataset_id}/documents/{self.id}/chunks', data)res = res.json()if res.get("code") == 0: