@petercatai/whisker-client 0.1.202504211811-dev → 0.1.202504211908-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +204 -19
- package/dist/api.js +47 -0
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ export interface IChunk {
|
|
|
97
97
|
* Metadata
|
|
98
98
|
* Arbitrary metadata associated with the content.
|
|
99
99
|
*/
|
|
100
|
-
metadata?:
|
|
100
|
+
metadata?: object | null;
|
|
101
101
|
/**
|
|
102
102
|
* Gmt Create
|
|
103
103
|
* creation time
|
|
@@ -161,7 +161,7 @@ export interface IGithubRepoCreate {
|
|
|
161
161
|
* additional metadata, user can update it
|
|
162
162
|
* @default {}
|
|
163
163
|
*/
|
|
164
|
-
metadata?:
|
|
164
|
+
metadata?: object;
|
|
165
165
|
/** source type */
|
|
166
166
|
source_type: IKnowledgeSourceEnum;
|
|
167
167
|
/**
|
|
@@ -237,7 +237,7 @@ export interface IImageCreate {
|
|
|
237
237
|
* additional metadata, user can update it
|
|
238
238
|
* @default {}
|
|
239
239
|
*/
|
|
240
|
-
metadata?:
|
|
240
|
+
metadata?: object;
|
|
241
241
|
/** source type */
|
|
242
242
|
source_type: IKnowledgeSourceEnum;
|
|
243
243
|
/**
|
|
@@ -286,7 +286,7 @@ export interface IJSONCreate {
|
|
|
286
286
|
* additional metadata, user can update it
|
|
287
287
|
* @default {}
|
|
288
288
|
*/
|
|
289
|
-
metadata?:
|
|
289
|
+
metadata?: object;
|
|
290
290
|
/** source type */
|
|
291
291
|
source_type: IKnowledgeSourceEnum;
|
|
292
292
|
/**
|
|
@@ -420,7 +420,7 @@ export interface IKnowledgeInput {
|
|
|
420
420
|
* additional metadata, user can update it
|
|
421
421
|
* @default {}
|
|
422
422
|
*/
|
|
423
|
-
metadata?:
|
|
423
|
+
metadata?: object;
|
|
424
424
|
/**
|
|
425
425
|
* Retrieval Count
|
|
426
426
|
* count of the retrieval
|
|
@@ -505,7 +505,7 @@ export interface IKnowledgeOutput {
|
|
|
505
505
|
* Metadata
|
|
506
506
|
* additional metadata, user can update it
|
|
507
507
|
*/
|
|
508
|
-
metadata?:
|
|
508
|
+
metadata?: object | null;
|
|
509
509
|
/**
|
|
510
510
|
* Retrieval Count
|
|
511
511
|
* count of the retrieval
|
|
@@ -602,7 +602,7 @@ export interface IKnowledgeCreate {
|
|
|
602
602
|
* additional metadata, user can update it
|
|
603
603
|
* @default {}
|
|
604
604
|
*/
|
|
605
|
-
metadata?:
|
|
605
|
+
metadata?: object;
|
|
606
606
|
/**
|
|
607
607
|
* Parent Id
|
|
608
608
|
* parent knowledge id
|
|
@@ -639,7 +639,7 @@ export interface IMarkdownCreate {
|
|
|
639
639
|
* additional metadata, user can update it
|
|
640
640
|
* @default {}
|
|
641
641
|
*/
|
|
642
|
-
metadata?:
|
|
642
|
+
metadata?: object;
|
|
643
643
|
/** source type */
|
|
644
644
|
source_type: IKnowledgeSourceEnum;
|
|
645
645
|
/**
|
|
@@ -735,7 +735,7 @@ export interface IPDFCreate {
|
|
|
735
735
|
* additional metadata, user can update it
|
|
736
736
|
* @default {}
|
|
737
737
|
*/
|
|
738
|
-
metadata?:
|
|
738
|
+
metadata?: object;
|
|
739
739
|
/** source type */
|
|
740
740
|
source_type: IKnowledgeSourceEnum;
|
|
741
741
|
/**
|
|
@@ -837,7 +837,7 @@ export interface IPageParamsChunk {
|
|
|
837
837
|
* Eq Conditions
|
|
838
838
|
* list of equality conditions, each as a dict with key and value
|
|
839
839
|
*/
|
|
840
|
-
eq_conditions?:
|
|
840
|
+
eq_conditions?: object | null;
|
|
841
841
|
}
|
|
842
842
|
/** PageParams[Knowledge] */
|
|
843
843
|
export interface IPageParamsKnowledge {
|
|
@@ -871,7 +871,41 @@ export interface IPageParamsKnowledge {
|
|
|
871
871
|
* Eq Conditions
|
|
872
872
|
* list of equality conditions, each as a dict with key and value
|
|
873
873
|
*/
|
|
874
|
-
eq_conditions?:
|
|
874
|
+
eq_conditions?: object | null;
|
|
875
|
+
}
|
|
876
|
+
/** PageParams[Space] */
|
|
877
|
+
export interface IPageParamsSpace {
|
|
878
|
+
/**
|
|
879
|
+
* Page
|
|
880
|
+
* page number
|
|
881
|
+
* @min 1
|
|
882
|
+
* @default 1
|
|
883
|
+
*/
|
|
884
|
+
page?: number;
|
|
885
|
+
/**
|
|
886
|
+
* Page Size
|
|
887
|
+
* page size
|
|
888
|
+
* @min 1
|
|
889
|
+
* @max 1000
|
|
890
|
+
* @default 10
|
|
891
|
+
*/
|
|
892
|
+
page_size?: number;
|
|
893
|
+
/**
|
|
894
|
+
* Order By
|
|
895
|
+
* order by field
|
|
896
|
+
*/
|
|
897
|
+
order_by?: string | null;
|
|
898
|
+
/**
|
|
899
|
+
* Order Direction
|
|
900
|
+
* asc or desc
|
|
901
|
+
* @default "asc"
|
|
902
|
+
*/
|
|
903
|
+
order_direction?: string | null;
|
|
904
|
+
/**
|
|
905
|
+
* Eq Conditions
|
|
906
|
+
* list of equality conditions, each as a dict with key and value
|
|
907
|
+
*/
|
|
908
|
+
eq_conditions?: object | null;
|
|
875
909
|
}
|
|
876
910
|
/** PageParams[Task] */
|
|
877
911
|
export interface IPageParamsTask {
|
|
@@ -905,7 +939,7 @@ export interface IPageParamsTask {
|
|
|
905
939
|
* Eq Conditions
|
|
906
940
|
* list of equality conditions, each as a dict with key and value
|
|
907
941
|
*/
|
|
908
|
-
eq_conditions?:
|
|
942
|
+
eq_conditions?: object | null;
|
|
909
943
|
}
|
|
910
944
|
/** PageResponse[Chunk] */
|
|
911
945
|
export interface IPageResponseChunk {
|
|
@@ -933,6 +967,19 @@ export interface IPageResponseKnowledge {
|
|
|
933
967
|
/** Total Pages */
|
|
934
968
|
total_pages: number;
|
|
935
969
|
}
|
|
970
|
+
/** PageResponse[SpaceResponse] */
|
|
971
|
+
export interface IPageResponseSpaceResponse {
|
|
972
|
+
/** Items */
|
|
973
|
+
items: ISpaceResponse[];
|
|
974
|
+
/** Total */
|
|
975
|
+
total: number;
|
|
976
|
+
/** Page */
|
|
977
|
+
page: number;
|
|
978
|
+
/** Page Size */
|
|
979
|
+
page_size: number;
|
|
980
|
+
/** Total Pages */
|
|
981
|
+
total_pages: number;
|
|
982
|
+
}
|
|
936
983
|
/** QACreate */
|
|
937
984
|
export interface IQACreate {
|
|
938
985
|
/**
|
|
@@ -957,7 +1004,7 @@ export interface IQACreate {
|
|
|
957
1004
|
* additional metadata, user can update it
|
|
958
1005
|
* @default {}
|
|
959
1006
|
*/
|
|
960
|
-
metadata?:
|
|
1007
|
+
metadata?: object;
|
|
961
1008
|
/** source type */
|
|
962
1009
|
source_type: IKnowledgeSourceEnum;
|
|
963
1010
|
/**
|
|
@@ -1060,6 +1107,22 @@ export interface IResponseModelPageResponseKnowledge {
|
|
|
1060
1107
|
/** Message */
|
|
1061
1108
|
message?: string | null;
|
|
1062
1109
|
}
|
|
1110
|
+
/** ResponseModel[PageResponse[SpaceResponse]] */
|
|
1111
|
+
export interface IResponseModelPageResponseSpaceResponse {
|
|
1112
|
+
/** Success */
|
|
1113
|
+
success: boolean;
|
|
1114
|
+
data?: IPageResponseSpaceResponse | null;
|
|
1115
|
+
/** Message */
|
|
1116
|
+
message?: string | null;
|
|
1117
|
+
}
|
|
1118
|
+
/** ResponseModel[SpaceResponse] */
|
|
1119
|
+
export interface IResponseModelSpaceResponse {
|
|
1120
|
+
/** Success */
|
|
1121
|
+
success: boolean;
|
|
1122
|
+
data?: ISpaceResponse | null;
|
|
1123
|
+
/** Message */
|
|
1124
|
+
message?: string | null;
|
|
1125
|
+
}
|
|
1063
1126
|
/** ResponseModel[StatusStatisticsPageResponse[Task]] */
|
|
1064
1127
|
export interface IResponseModelStatusStatisticsPageResponseTask {
|
|
1065
1128
|
/** Success */
|
|
@@ -1113,7 +1176,7 @@ export interface IRetrievalByKnowledgeRequest {
|
|
|
1113
1176
|
* metadata filter
|
|
1114
1177
|
* @default {}
|
|
1115
1178
|
*/
|
|
1116
|
-
metadata_filter?:
|
|
1179
|
+
metadata_filter?: object;
|
|
1117
1180
|
/**
|
|
1118
1181
|
* Knowledge Id List
|
|
1119
1182
|
* knowledge id list
|
|
@@ -1149,7 +1212,7 @@ export interface IRetrievalBySpaceRequest {
|
|
|
1149
1212
|
* metadata filter
|
|
1150
1213
|
* @default {}
|
|
1151
1214
|
*/
|
|
1152
|
-
metadata_filter?:
|
|
1215
|
+
metadata_filter?: object;
|
|
1153
1216
|
/**
|
|
1154
1217
|
* Space Id List
|
|
1155
1218
|
* space id list
|
|
@@ -1197,7 +1260,7 @@ export interface IRetrievalChunk {
|
|
|
1197
1260
|
* Metadata
|
|
1198
1261
|
* Arbitrary metadata associated with the content.
|
|
1199
1262
|
*/
|
|
1200
|
-
metadata?:
|
|
1263
|
+
metadata?: object | null;
|
|
1201
1264
|
/**
|
|
1202
1265
|
* Gmt Create
|
|
1203
1266
|
* creation time
|
|
@@ -1252,6 +1315,81 @@ export interface IS3SourceConfig {
|
|
|
1252
1315
|
*/
|
|
1253
1316
|
session_token?: string | null;
|
|
1254
1317
|
}
|
|
1318
|
+
/**
|
|
1319
|
+
* SpaceCreate
|
|
1320
|
+
* SpaceCreate model for creating space resources.
|
|
1321
|
+
* Attributes:
|
|
1322
|
+
* space_name (str): Space name, example: petercat bot group.
|
|
1323
|
+
* description (str): descrition of the space resource.
|
|
1324
|
+
*/
|
|
1325
|
+
export interface ISpaceCreate {
|
|
1326
|
+
/**
|
|
1327
|
+
* Space Name
|
|
1328
|
+
* name of the space resource
|
|
1329
|
+
* @maxLength 64
|
|
1330
|
+
*/
|
|
1331
|
+
space_name: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* Description
|
|
1334
|
+
* descrition of the space
|
|
1335
|
+
* @maxLength 255
|
|
1336
|
+
*/
|
|
1337
|
+
description: string;
|
|
1338
|
+
}
|
|
1339
|
+
/**
|
|
1340
|
+
* SpaceResponse
|
|
1341
|
+
* SpaceResponse model class that extends Space.
|
|
1342
|
+
* Attributes:
|
|
1343
|
+
* (str): Space ID.
|
|
1344
|
+
* total_size Optional[int]: size of the all kowledge in this space.
|
|
1345
|
+
* knowledge_size Optional[int]: count of the knowledge in this space.
|
|
1346
|
+
*/
|
|
1347
|
+
export interface ISpaceResponse {
|
|
1348
|
+
/**
|
|
1349
|
+
* Space Name
|
|
1350
|
+
* name of the space resource
|
|
1351
|
+
* @maxLength 64
|
|
1352
|
+
*/
|
|
1353
|
+
space_name: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* Description
|
|
1356
|
+
* descrition of the space
|
|
1357
|
+
* @maxLength 255
|
|
1358
|
+
*/
|
|
1359
|
+
description: string;
|
|
1360
|
+
/**
|
|
1361
|
+
* Space Id
|
|
1362
|
+
* space id
|
|
1363
|
+
*/
|
|
1364
|
+
space_id?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Gmt Create
|
|
1367
|
+
* creation time
|
|
1368
|
+
*/
|
|
1369
|
+
gmt_create?: string;
|
|
1370
|
+
/**
|
|
1371
|
+
* Gmt Modified
|
|
1372
|
+
* update time
|
|
1373
|
+
*/
|
|
1374
|
+
gmt_modified?: string;
|
|
1375
|
+
/**
|
|
1376
|
+
* Tenant Id
|
|
1377
|
+
* tenant id
|
|
1378
|
+
*/
|
|
1379
|
+
tenant_id: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* Storage Size
|
|
1382
|
+
* size of the all kowledge in this space
|
|
1383
|
+
* @default 0
|
|
1384
|
+
*/
|
|
1385
|
+
storage_size?: number | null;
|
|
1386
|
+
/**
|
|
1387
|
+
* Knowledge Count
|
|
1388
|
+
* count of the knowledge in this space
|
|
1389
|
+
* @default 0
|
|
1390
|
+
*/
|
|
1391
|
+
knowledge_count?: number | null;
|
|
1392
|
+
}
|
|
1255
1393
|
/** StatusStatisticsPageResponse[Task] */
|
|
1256
1394
|
export interface IStatusStatisticsPageResponseTask {
|
|
1257
1395
|
/** Items */
|
|
@@ -1291,7 +1429,7 @@ export interface ITask {
|
|
|
1291
1429
|
* Metadata
|
|
1292
1430
|
* Metadata for the task
|
|
1293
1431
|
*/
|
|
1294
|
-
metadata?:
|
|
1432
|
+
metadata?: object | null;
|
|
1295
1433
|
/**
|
|
1296
1434
|
* Error Message
|
|
1297
1435
|
* Error message (only present if the task failed)
|
|
@@ -1365,7 +1503,7 @@ export interface ITenant {
|
|
|
1365
1503
|
* Metadata
|
|
1366
1504
|
* Metadata for the tenant
|
|
1367
1505
|
*/
|
|
1368
|
-
metadata?:
|
|
1506
|
+
metadata?: object | null;
|
|
1369
1507
|
/**
|
|
1370
1508
|
* Gmt Create
|
|
1371
1509
|
* tenant created time
|
|
@@ -1408,7 +1546,7 @@ export interface ITextCreate {
|
|
|
1408
1546
|
* additional metadata, user can update it
|
|
1409
1547
|
* @default {}
|
|
1410
1548
|
*/
|
|
1411
|
-
metadata?:
|
|
1549
|
+
metadata?: object;
|
|
1412
1550
|
/** source type */
|
|
1413
1551
|
source_type: IKnowledgeSourceEnum;
|
|
1414
1552
|
/**
|
|
@@ -1720,6 +1858,53 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1720
1858
|
*/
|
|
1721
1859
|
getTenant: (params?: RequestParams) => Promise<HttpResponse<any, void | IHTTPValidationError>>;
|
|
1722
1860
|
};
|
|
1861
|
+
space: {
|
|
1862
|
+
/**
|
|
1863
|
+
* @description 获取知识库分页列表
|
|
1864
|
+
*
|
|
1865
|
+
* @tags space
|
|
1866
|
+
* @name GetSpaceList
|
|
1867
|
+
* @summary Get Space List
|
|
1868
|
+
* @request POST:/api/space/list
|
|
1869
|
+
*/
|
|
1870
|
+
getSpaceList: (data: IPageParamsSpace, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponseSpaceResponse, void | IHTTPValidationError>>;
|
|
1871
|
+
/**
|
|
1872
|
+
* @description 创建知识库
|
|
1873
|
+
*
|
|
1874
|
+
* @tags space
|
|
1875
|
+
* @name AddSpace
|
|
1876
|
+
* @summary Add Space
|
|
1877
|
+
* @request POST:/api/space/add
|
|
1878
|
+
*/
|
|
1879
|
+
addSpace: (data: ISpaceCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
|
|
1880
|
+
/**
|
|
1881
|
+
* @description 删除知识库
|
|
1882
|
+
*
|
|
1883
|
+
* @tags space
|
|
1884
|
+
* @name DeleteSpace
|
|
1885
|
+
* @summary Delete Space
|
|
1886
|
+
* @request DELETE:/api/space/{space_id}
|
|
1887
|
+
*/
|
|
1888
|
+
deleteSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelNoneType, void | IHTTPValidationError>>;
|
|
1889
|
+
/**
|
|
1890
|
+
* @description 修改知识库信息,注意:tenant_id 和 space_id 字段不可修改
|
|
1891
|
+
*
|
|
1892
|
+
* @tags space
|
|
1893
|
+
* @name UpdateSpace
|
|
1894
|
+
* @summary Update Space
|
|
1895
|
+
* @request PUT:/api/space/{space_id}
|
|
1896
|
+
*/
|
|
1897
|
+
updateSpace: (spaceId: string, data: ISpaceCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
|
|
1898
|
+
/**
|
|
1899
|
+
* @description 获取知识库详情
|
|
1900
|
+
*
|
|
1901
|
+
* @tags space
|
|
1902
|
+
* @name GetSpaceById
|
|
1903
|
+
* @summary Get Space By Id
|
|
1904
|
+
* @request GET:/api/space/{space_id}
|
|
1905
|
+
*/
|
|
1906
|
+
getSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
|
|
1907
|
+
};
|
|
1723
1908
|
healthChecker: {
|
|
1724
1909
|
/**
|
|
1725
1910
|
* No description
|
package/dist/api.js
CHANGED
|
@@ -360,6 +360,53 @@ class Api extends HttpClient {
|
|
|
360
360
|
*/
|
|
361
361
|
getTenant: (params = {}) => this.request(Object.assign({ path: `/api/tenant/me`, method: "GET", format: "json" }, params)),
|
|
362
362
|
};
|
|
363
|
+
this.space = {
|
|
364
|
+
/**
|
|
365
|
+
* @description 获取知识库分页列表
|
|
366
|
+
*
|
|
367
|
+
* @tags space
|
|
368
|
+
* @name GetSpaceList
|
|
369
|
+
* @summary Get Space List
|
|
370
|
+
* @request POST:/api/space/list
|
|
371
|
+
*/
|
|
372
|
+
getSpaceList: (data, params = {}) => this.request(Object.assign({ path: `/api/space/list`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
373
|
+
/**
|
|
374
|
+
* @description 创建知识库
|
|
375
|
+
*
|
|
376
|
+
* @tags space
|
|
377
|
+
* @name AddSpace
|
|
378
|
+
* @summary Add Space
|
|
379
|
+
* @request POST:/api/space/add
|
|
380
|
+
*/
|
|
381
|
+
addSpace: (data, params = {}) => this.request(Object.assign({ path: `/api/space/add`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
382
|
+
/**
|
|
383
|
+
* @description 删除知识库
|
|
384
|
+
*
|
|
385
|
+
* @tags space
|
|
386
|
+
* @name DeleteSpace
|
|
387
|
+
* @summary Delete Space
|
|
388
|
+
* @request DELETE:/api/space/{space_id}
|
|
389
|
+
*/
|
|
390
|
+
deleteSpace: (spaceId, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "DELETE", format: "json" }, params)),
|
|
391
|
+
/**
|
|
392
|
+
* @description 修改知识库信息,注意:tenant_id 和 space_id 字段不可修改
|
|
393
|
+
*
|
|
394
|
+
* @tags space
|
|
395
|
+
* @name UpdateSpace
|
|
396
|
+
* @summary Update Space
|
|
397
|
+
* @request PUT:/api/space/{space_id}
|
|
398
|
+
*/
|
|
399
|
+
updateSpace: (spaceId, data, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
400
|
+
/**
|
|
401
|
+
* @description 获取知识库详情
|
|
402
|
+
*
|
|
403
|
+
* @tags space
|
|
404
|
+
* @name GetSpaceById
|
|
405
|
+
* @summary Get Space By Id
|
|
406
|
+
* @request GET:/api/space/{space_id}
|
|
407
|
+
*/
|
|
408
|
+
getSpaceById: (spaceId, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "GET", format: "json" }, params)),
|
|
409
|
+
};
|
|
363
410
|
this.healthChecker = {
|
|
364
411
|
/**
|
|
365
412
|
* No description
|