fix(sdk): reject conflicting dataset ID filters (#19047)

Python SDK list_datasets now rejects both id and ids together (client-side), matching server and list_documents.

Co-authored-by: root <kinsonnee@gmail.com>
This commit is contained in:
WOLIKIMCHENGandroot authored and GitHub committed 2026-08-31 17:53:25 +08:00
1 parent 8347d1c566
commit 480a4e436c
2 files changed
+52

No files matched your search

+3
View File
@@ -98,6 +98,9 @@ class RAGFlow:
def list_datasets(
self, page: int = 1, page_size: int = 30, orderby: str = "create_time", desc: bool = True, id: str | None = None, ids: list[str] | None = None, name: str | None = None
) -> list[DataSet]:
if id and ids:
raise ValueError("Cannot use both 'id' and 'ids' parameters at the same time.")
res = self.get(
"/datasets",
{