Skip to content

Commit

Permalink
fix: Correct knowledge base document list retrieval API (#37)
Browse files Browse the repository at this point in the history
- Fixed the method and parameters for retrieving the knowledge base
document list
  • Loading branch information
chyroc authored Sep 29, 2024
1 parent bc868be commit 2c6d8eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cozepy/knowledge/documents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,13 @@ def list(
:return: list of Document
"""
url = f"{self._base_url}/open_api/knowledge/document/list"
params = {
body = {
"dataset_id": dataset_id,
"page": page_num,
"size": page_size,
}
headers = {"Agw-Js-Conv": "str"}
res = self._requester.request("get", url, self._PrivateListDocumentsV1Data, params=params, headers=headers)
res = self._requester.request("post", url, self._PrivateListDocumentsV1Data, body=body, headers=headers)
return NumberPaged(
items=res.document_infos,
page_num=page_num,
Expand Down

0 comments on commit 2c6d8eb

Please sign in to comment.