API: created list_doc (#1327)

### What problem does this PR solve?

Adds the api of listing documentation.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
cecilia-uu
2024-07-01 18:15:00 +08:00
committed by GitHub
parent 8b1c145e56
commit b5389f487c
7 changed files with 410 additions and 244 deletions

View File

@ -60,6 +60,9 @@ class KnowledgebaseService(CommonService):
if offset < 0 or offset > kbs_length:
raise IndexError("Offset is out of the valid range.")
if count == -1:
return kbs[offset:]
return kbs[offset:offset+count]
@classmethod