5
5
6
6
** POST** ` /api/v1/dataset `
7
7
8
- Creates a dataset.
8
+ Creates a knowledge base ( dataset) .
9
9
10
10
### Request
11
11
@@ -31,11 +31,11 @@ Creates a dataset.
31
31
#### Request example
32
32
33
33
``` bash
34
- # "id": id must not be provided.
35
- # "name": name is required and can't be duplicated.
34
+ # "id": "id" must not be provided.
35
+ # "name": name is required and cannot be duplicated.
36
36
# "tenant_id": tenant_id must not be provided.
37
- # "embedding_model": embedding_model must not be provided .
38
- # "navie" means general.
37
+ # "embedding_model": REQUIRED .
38
+ # "naive": general.
39
39
curl --request POST \
40
40
--url http://{address}/api/v1/dataset \
41
41
--header ' Content-Type: application/json' \
@@ -51,21 +51,21 @@ curl --request POST \
51
51
#### Request parameters
52
52
53
53
- ` "id" ` : (* Body parameter* )
54
- The ID of the created dataset used to uniquely identify different datasets .
55
- - If creating a dataset, ` id ` must not be provided.
54
+ The unique identifier of each created dataset.
55
+ - When creating a dataset, ` id ` must not be provided.
56
56
57
57
- ` "name" ` : (* Body parameter* )
58
58
The name of the dataset, which must adhere to the following requirements:
59
59
- Required when creating a dataset and must be unique.
60
- - If updating a dataset, ` name ` must still be unique.
60
+ - When updating a dataset, ` name ` must still be unique.
61
61
62
62
- ` "avatar" ` : (* Body parameter* )
63
63
Base64 encoding of the avatar.
64
64
65
65
- ` "tenant_id" ` : (* Body parameter* )
66
66
The ID of the tenant associated with the dataset, used to link it with specific users.
67
- - If creating a dataset, ` tenant_id ` must not be provided.
68
- - If updating a dataset, ` tenant_id ` cannot be changed.
67
+ - When creating a dataset, ` tenant_id ` must not be provided.
68
+ - When updating a dataset, ` tenant_id ` cannot be changed.
69
69
70
70
- ` "description" ` : (* Body parameter* )
71
71
The description of the dataset.
@@ -74,31 +74,31 @@ curl --request POST \
74
74
The language setting for the dataset.
75
75
76
76
- ` "embedding_model" ` : (* Body parameter* )
77
- Embedding model used in the dataset to generate vector embeddings.
78
- - If creating a dataset, ` embedding_model ` must not be provided.
79
- - If updating a dataset, ` embedding_model ` cannot be changed.
77
+ Embedding model used in the dataset for generating vector embeddings.
78
+ - When creating a dataset, ` embedding_model ` must not be provided.
79
+ - When updating a dataset, ` embedding_model ` cannot be changed.
80
80
81
81
- ` "permission" ` : (* Body parameter* )
82
82
Specifies who can manipulate the dataset.
83
83
84
84
- ` "document_count" ` : (* Body parameter* )
85
85
Document count of the dataset.
86
- - If updating a dataset, ` document_count ` cannot be changed.
86
+ - When updating a dataset, ` document_count ` cannot be changed.
87
87
88
88
- ` "chunk_count" ` : (* Body parameter* )
89
89
Chunk count of the dataset.
90
- - If updating a dataset, ` chunk_count ` cannot be changed.
90
+ - When updating a dataset, ` chunk_count ` cannot be changed.
91
91
92
92
- ` "parse_method" ` : (* Body parameter* )
93
93
Parsing method of the dataset.
94
- - If updating ` parse_method ` , ` chunk_count ` must be greater than 0.
94
+ - When updating ` parse_method ` , ` chunk_count ` must be greater than 0.
95
95
96
96
- ` "parser_config" ` : (* Body parameter* )
97
97
The configuration settings for the dataset parser.
98
98
99
99
### Response
100
100
101
- The successful response includes a JSON object like the following:
101
+ A successful response includes a JSON object like the following:
102
102
103
103
``` json
104
104
{
@@ -139,8 +139,7 @@ The successful response includes a JSON object like the following:
139
139
- ` "error_code" ` : ` integer `
140
140
` 0 ` : The operation succeeds.
141
141
142
-
143
- The error response includes a JSON object like the following:
142
+ An error response includes a JSON object like the following:
144
143
145
144
``` json
146
145
{
@@ -153,7 +152,7 @@ The error response includes a JSON object like the following:
153
152
154
153
** DELETE** ` /api/v1/dataset `
155
154
156
- Deletes datasets by ids .
155
+ Deletes datasets by their IDs .
157
156
158
157
### Request
159
158
@@ -169,7 +168,7 @@ Deletes datasets by ids.
169
168
#### Request example
170
169
171
170
``` bash
172
- # Either id or name must be provided, but not both.
171
+ # Specify either "ids" or "names", NOT both.
173
172
curl --request DELETE \
174
173
--url http://{address}/api/v1/dataset \
175
174
--header ' Content-Type: application/json' \
@@ -181,13 +180,13 @@ curl --request DELETE \
181
180
182
181
#### Request parameters
183
182
184
- - ` "ids" ` : (* Body parameter* )
185
- Dataset IDs to delete.
183
+ - ` "ids" ` : (* Body parameter* )
184
+ IDs of the datasets to delete.
186
185
187
186
188
187
### Response
189
188
190
- The successful response includes a JSON object like the following:
189
+ A successful response includes a JSON object like the following:
191
190
192
191
``` json
193
192
{
@@ -199,7 +198,7 @@ The successful response includes a JSON object like the following:
199
198
` 0 ` : The operation succeeds.
200
199
201
200
202
- The error response includes a JSON object like the following:
201
+ An error response includes a JSON object like the following:
203
202
204
203
``` json
205
204
{
@@ -212,7 +211,7 @@ The error response includes a JSON object like the following:
212
211
213
212
** PUT** ` /api/v1/dataset/{dataset_id} `
214
213
215
- Updates a dataset by its id .
214
+ Updates a dataset by its ID .
216
215
217
216
### Request
218
217
@@ -227,14 +226,14 @@ Updates a dataset by its id.
227
226
#### Request example
228
227
229
228
``` bash
230
- # "id": id is required.
231
- # "name": If you update name, it can't be duplicated.
232
- # "tenant_id": If you update tenant_id, it can't be changed
233
- # "embedding_model": If you update embedding_model, it can't be changed.
234
- # "chunk_count": If you update chunk_count, it can't be changed.
235
- # "document_count": If you update document_count, it can't be changed.
236
- # "parse_method": If you update parse_method, chunk_count must be 0.
237
- # "navie" means general .
229
+ # "id": REQUIRED
230
+ # "name": If you update " name" , it cannot be duplicated.
231
+ # "tenant_id": If you update " tenant_id" , it cannot be changed
232
+ # "embedding_model": If you update " embedding_model" , it cannot be changed.
233
+ # "chunk_count": If you update " chunk_count" , it cannot be changed.
234
+ # "document_count": If you update " document_count" , it cannot be changed.
235
+ # "parse_method": If you update " parse_method", " chunk_count" must be 0.
236
+ # "naive": General .
238
237
curl --request PUT \
239
238
--url http://{address}/api/v1/dataset/{dataset_id} \
240
239
--header ' Content-Type: application/json' \
@@ -245,17 +244,18 @@ curl --request PUT \
245
244
"embedding_model": "BAAI/bge-zh-v1.5",
246
245
"chunk_count": 0,
247
246
"document_count": 0,
248
- "parse_method": "navie "
247
+ "parse_method": "naive "
249
248
}'
250
249
```
251
250
252
251
#### Request parameters
253
- (Refer to the "Create Dataset" for the complete structure of the request parameters.)
252
+
253
+ See the "Create Dataset" for the complete structure of the request parameters.
254
254
255
255
256
256
### Response
257
257
258
- The successful response includes a JSON object like the following:
258
+ A successful response includes a JSON object like the following:
259
259
260
260
``` json
261
261
{
@@ -267,7 +267,7 @@ The successful response includes a JSON object like the following:
267
267
` 0 ` : The operation succeeds.
268
268
269
269
270
- The error response includes a JSON object like the following:
270
+ An error response includes a JSON object like the following:
271
271
272
272
``` json
273
273
{
@@ -321,7 +321,7 @@ curl --request GET \
321
321
322
322
### Response
323
323
324
- The successful response includes a JSON object like the following:
324
+ A successful response includes a JSON object like the following:
325
325
326
326
``` json
327
327
{
@@ -365,7 +365,7 @@ The successful response includes a JSON object like the following:
365
365
```
366
366
367
367
368
- The error response includes a JSON object like the following:
368
+ An error response includes a JSON object like the following:
369
369
370
370
``` json
371
371
{
@@ -409,7 +409,7 @@ curl --request POST \
409
409
410
410
### Response
411
411
412
- The successful response includes a JSON object like the following:
412
+ A successful response includes a JSON object like the following:
413
413
414
414
``` shell
415
415
{
@@ -421,7 +421,7 @@ The successful response includes a JSON object like the following:
421
421
` 0 ` : The operation succeeds.
422
422
423
423
424
- The error response includes a JSON object like the following:
424
+ An error response includes a JSON object like the following:
425
425
426
426
``` shell
427
427
{
@@ -464,7 +464,7 @@ curl --request GET \
464
464
465
465
### Response
466
466
467
- The successful response includes a JSON object like the following:
467
+ A successful response includes a JSON object like the following:
468
468
469
469
``` shell
470
470
{
@@ -476,7 +476,7 @@ The successful response includes a JSON object like the following:
476
476
` 0 ` : The operation succeeds.
477
477
478
478
479
- The error response includes a JSON object like the following:
479
+ An error response includes a JSON object like the following:
480
480
481
481
``` shell
482
482
{
@@ -528,7 +528,7 @@ curl --request GET \
528
528
529
529
### Response
530
530
531
- The successful response includes a JSON object like the following:
531
+ A successful response includes a JSON object like the following:
532
532
533
533
``` shell
534
534
{
@@ -605,7 +605,7 @@ The successful response includes a JSON object like the following:
605
605
` 0 ` : The operation succeeds.
606
606
607
607
608
- The error response includes a JSON object like the following:
608
+ An error response includes a JSON object like the following:
609
609
610
610
``` shell
611
611
{
@@ -659,15 +659,15 @@ curl --request PUT \
659
659
660
660
### Response
661
661
662
- The successful response includes a JSON object like the following:
662
+ A successful response includes a JSON object like the following:
663
663
664
664
``` shell
665
665
{
666
666
" code" : 0
667
667
}
668
668
```
669
669
670
- The error response includes a JSON object like the following:
670
+ An error response includes a JSON object like the following:
671
671
672
672
``` shell
673
673
{
@@ -710,15 +710,15 @@ curl --request POST \
710
710
711
711
### Response
712
712
713
- The successful response includes a JSON object like the following:
713
+ A successful response includes a JSON object like the following:
714
714
715
715
``` shell
716
716
{
717
717
" code" : 0
718
718
}
719
719
```
720
720
721
- The error response includes a JSON object like the following:
721
+ An error response includes a JSON object like the following:
722
722
723
723
``` shell
724
724
{
@@ -761,15 +761,15 @@ curl --request DELETE \
761
761
762
762
### Response
763
763
764
- The successful response includes a JSON object like the following:
764
+ A successful response includes a JSON object like the following:
765
765
766
766
``` shell
767
767
{
768
768
" code" : 0
769
769
}
770
770
```
771
771
772
- The error response includes a JSON object like the following:
772
+ An error response includes a JSON object like the following:
773
773
774
774
``` shell
775
775
{
@@ -808,7 +808,7 @@ curl --request GET \
808
808
809
809
### Response
810
810
811
- The successful response includes a JSON object like the following:
811
+ A successful response includes a JSON object like the following:
812
812
813
813
``` shell
814
814
{
@@ -863,7 +863,7 @@ The successful response includes a JSON object like the following:
863
863
}
864
864
```
865
865
866
- The error response includes a JSON object like the following:
866
+ An error response includes a JSON object like the following:
867
867
868
868
``` shell
869
869
{
0 commit comments