GYH
commited on
Commit
·
2d8207d
1
Parent(s):
3c41162
Add api.md:/api/list_kb_docs/ description (#881)
Browse files### What problem does this PR solve?
Add api.md:/api/list_kb_docs/ description
#717
### Type of change
- [x] Documentation Update
- docs/references/api.md +40 -0
docs/references/api.md
CHANGED
|
@@ -404,3 +404,43 @@ Get the chunks of the document based on doc_name or doc_id.
|
|
| 404 |
}
|
| 405 |
|
| 406 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
}
|
| 405 |
|
| 406 |
```
|
| 407 |
+
|
| 408 |
+
## Get document list from knowledge base
|
| 409 |
+
|
| 410 |
+
Get document list based on the knowledge base name and corresponding parameters.
|
| 411 |
+
### Path: /api/list_kb_docs/
|
| 412 |
+
### Method: POST
|
| 413 |
+
|
| 414 |
+
### Parameter:
|
| 415 |
+
|
| 416 |
+
| Name | Type | Optional | Description |
|
| 417 |
+
|-------------|--------|----------|----------------------------------------------------------------------|
|
| 418 |
+
| `kb_name` | string | No | The name of the knowledge base, from which you get the document list. |
|
| 419 |
+
| `page` | int | Yes | The number of pages, default:1. |
|
| 420 |
+
| `page_size` | int | Yes | The number of docs for each page, default:15. |
|
| 421 |
+
| `orderby` | string | Yes | `chunk_num`, `create_time`, or `size`, default:`create_time` |
|
| 422 |
+
| `desc` | bool | Yes | Default:True. |
|
| 423 |
+
| `keywords` | string | Yes | Keyword of the document name. |
|
| 424 |
+
|
| 425 |
+
|
| 426 |
+
### Response
|
| 427 |
+
```json
|
| 428 |
+
{
|
| 429 |
+
"data": {
|
| 430 |
+
"docs": [
|
| 431 |
+
{
|
| 432 |
+
"doc_id": "bad89a84168c11ef9ce40242ac120006",
|
| 433 |
+
"doc_name": "test.xlsx"
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"doc_id": "641a9b4013f111efb53f0242ac120006",
|
| 437 |
+
"doc_name": "1111.pdf"
|
| 438 |
+
}
|
| 439 |
+
],
|
| 440 |
+
"total": 2
|
| 441 |
+
},
|
| 442 |
+
"retcode": 0,
|
| 443 |
+
"retmsg": "success"
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
```
|