Fix list files (#13960)

### What problem does this PR solve?

As title.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Standardized the query parameter used when listing documents so
listings behave consistently across the web and client interfaces.
* Clarified the error message shown when a required dataset ID is
missing to give clearer guidance to users.

* **Tests**
* Updated test coverage to reflect the standardized dataset identifier
usage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-04-08 13:38:30 +08:00
committed by GitHub
parent b8764cfa11
commit ad789f5c43
10 changed files with 37 additions and 37 deletions

View File

@@ -69,7 +69,7 @@ def upload_file(auth, dataset_id, path):
def list_document(auth, dataset_id):
authorization = {"Authorization": auth}
url = f"{HOST_ADDRESS}/v1/document/list?kb_id={dataset_id}"
url = f"{HOST_ADDRESS}/v1/document/list?id={dataset_id}"
json = {}
res = requests.post(url=url, headers=authorization, json=json)
return res.json()