fix(annotation): 修正知识库同步服务中的分页参数

- 将_list_knowledge_sets方法中的page参数从0改为1
- 将文件检索接口中的page参数从0改为1
- 统一所有分页查询的起始页码为1,避免空结果返回
This commit is contained in:
2026-01-22 20:28:20 +08:00
parent 90c5cc44e8
commit 9eafdc86bb

View File

@@ -132,7 +132,7 @@ class KnowledgeSyncService:
async def _list_knowledge_sets(self, keyword: Optional[str]) -> list[Dict[str, Any]]:
params: Dict[str, Any] = {
"page": 0,
"page": 1,
"size": self.KNOWLEDGE_SET_LIST_SIZE,
}
if keyword:
@@ -189,7 +189,7 @@ class KnowledgeSyncService:
file_id: str,
) -> Optional[Dict[str, Any]]:
params = {
"page": 0,
"page": 1,
"size": 1,
"sourceDatasetId": dataset_id,
"sourceFileId": file_id,