mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 14:55:53 +08:00
Fix:Discrepancy between Document.list_chunks() API documentation and implementation (#7575)
### What problem does this PR solve? Close #7567 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
af35e84655
commit
ad412380cb
@ -856,6 +856,12 @@ def list_chunks(tenant_id, dataset_id, document_id):
|
|||||||
required: false
|
required: false
|
||||||
default: 30
|
default: 30
|
||||||
description: Number of items per page.
|
description: Number of items per page.
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
description: Chunk Id.
|
||||||
- in: header
|
- in: header
|
||||||
name: Authorization
|
name: Authorization
|
||||||
type: string
|
type: string
|
||||||
|
@ -66,8 +66,8 @@ class Document(Base):
|
|||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
return res.content
|
return res.content
|
||||||
|
|
||||||
def list_chunks(self, page=1, page_size=30, keywords=""):
|
def list_chunks(self, page=1, page_size=30, keywords="", id = ""):
|
||||||
data = {"keywords": keywords, "page": page, "page_size": page_size}
|
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 = self.get(f'/datasets/{self.dataset_id}/documents/{self.id}/chunks', data)
|
||||||
res = res.json()
|
res = res.json()
|
||||||
if res.get("code") == 0:
|
if res.get("code") == 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user