@petercatai/whisker-client 0.1.202504281028 → 0.1.202504301149

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.
Files changed (3) hide show
  1. package/dist/api.d.ts +189 -14
  2. package/dist/api.js +12 -0
  3. package/package.json +2 -2
package/dist/api.d.ts CHANGED
@@ -32,7 +32,10 @@ export declare enum IKnowledgeSourceEnum {
32
32
  GithubRepo = "github_repo",
33
33
  GithubFile = "github_file",
34
34
  UserInputText = "user_input_text",
35
- UserUploadFile = "user_upload_file"
35
+ UserUploadFile = "user_upload_file",
36
+ Yuque = "yuque",
37
+ Youtube = "youtube",
38
+ Database = "database"
36
39
  }
37
40
  /** EmbeddingModelEnum */
38
41
  export declare enum IEmbeddingModelEnum {
@@ -1101,6 +1104,126 @@ export interface IQACreate {
1101
1104
  /** source config of the knowledge */
1102
1105
  source_config?: ITextSourceConfig | null;
1103
1106
  }
1107
+ /** QueryByDeepSearch */
1108
+ export interface IQueryByDeepSearch {
1109
+ /**
1110
+ * Embedding Model Name
1111
+ * The name of the embedding model
1112
+ */
1113
+ embedding_model_name: IEmbeddingModelEnum | string;
1114
+ /**
1115
+ * Similarity Threshold
1116
+ * The similarity threshold, ranging from 0.0 to 1.0.
1117
+ * @min 0
1118
+ * @max 1
1119
+ * @default 0.5
1120
+ */
1121
+ similarity_threshold?: number;
1122
+ /**
1123
+ * Top
1124
+ * The maximum number of results to return.
1125
+ * @min 1
1126
+ * @default 1024
1127
+ */
1128
+ top?: number;
1129
+ /**
1130
+ * Metadata Filter
1131
+ * metadata filter
1132
+ * @default {}
1133
+ */
1134
+ metadata_filter?: Record<string, any>;
1135
+ /**
1136
+ * Type
1137
+ * The type of the request, should be 'deep_search'.
1138
+ * @default "deep_search"
1139
+ */
1140
+ type?: string;
1141
+ /**
1142
+ * Space Name List
1143
+ * space name list
1144
+ */
1145
+ space_name_list: string[];
1146
+ }
1147
+ /** QueryByKnowledgeConfig */
1148
+ export interface IQueryByKnowledgeConfig {
1149
+ /**
1150
+ * Embedding Model Name
1151
+ * The name of the embedding model
1152
+ */
1153
+ embedding_model_name: string;
1154
+ /**
1155
+ * Similarity Threshold
1156
+ * The similarity threshold, ranging from 0.0 to 1.0.
1157
+ * @min 0
1158
+ * @max 1
1159
+ * @default 0.5
1160
+ */
1161
+ similarity_threshold?: number;
1162
+ /**
1163
+ * Top
1164
+ * The maximum number of results to return.
1165
+ * @min 1
1166
+ * @default 1024
1167
+ */
1168
+ top?: number;
1169
+ /**
1170
+ * Metadata Filter
1171
+ * metadata filter
1172
+ * @default {}
1173
+ */
1174
+ metadata_filter?: Record<string, any>;
1175
+ /**
1176
+ * Type
1177
+ * The type of the request, should be 'query_in_knowledge_list'.
1178
+ * @default "query_in_knowledge_list"
1179
+ */
1180
+ type?: string;
1181
+ /**
1182
+ * Space Id List
1183
+ * knowledge id list
1184
+ */
1185
+ space_id_list: string[];
1186
+ }
1187
+ /** QueryBySpaceConfig */
1188
+ export interface IQueryBySpaceConfig {
1189
+ /**
1190
+ * Embedding Model Name
1191
+ * The name of the embedding model
1192
+ */
1193
+ embedding_model_name: IEmbeddingModelEnum | string;
1194
+ /**
1195
+ * Similarity Threshold
1196
+ * The similarity threshold, ranging from 0.0 to 1.0.
1197
+ * @min 0
1198
+ * @max 1
1199
+ * @default 0.5
1200
+ */
1201
+ similarity_threshold?: number;
1202
+ /**
1203
+ * Top
1204
+ * The maximum number of results to return.
1205
+ * @min 1
1206
+ * @default 1024
1207
+ */
1208
+ top?: number;
1209
+ /**
1210
+ * Metadata Filter
1211
+ * metadata filter
1212
+ * @default {}
1213
+ */
1214
+ metadata_filter?: Record<string, any>;
1215
+ /**
1216
+ * Type
1217
+ * The type of the request, should be 'query_in_space_list'.
1218
+ * @default "query_in_space_list"
1219
+ */
1220
+ type?: string;
1221
+ /**
1222
+ * Space Id List
1223
+ * space id list
1224
+ */
1225
+ space_id_list: string[];
1226
+ }
1104
1227
  /** ResponseModel */
1105
1228
  export interface IResponseModel {
1106
1229
  /** Success */
@@ -1238,12 +1361,10 @@ export interface IResponseModelObject {
1238
1361
  /** RetrievalByKnowledgeRequest */
1239
1362
  export interface IRetrievalByKnowledgeRequest {
1240
1363
  /**
1241
- * Question
1242
- * The query question
1364
+ * Embedding Model Name
1365
+ * The name of the embedding model
1243
1366
  */
1244
- question: string;
1245
- /** The name of the embedding model */
1246
- embedding_model_name: IEmbeddingModelEnum;
1367
+ embedding_model_name: IEmbeddingModelEnum | string;
1247
1368
  /**
1248
1369
  * Similarity Threshold
1249
1370
  * The similarity threshold, ranging from 0.0 to 1.0.
@@ -1265,6 +1386,11 @@ export interface IRetrievalByKnowledgeRequest {
1265
1386
  * @default {}
1266
1387
  */
1267
1388
  metadata_filter?: Record<string, any>;
1389
+ /**
1390
+ * Question
1391
+ * The query question
1392
+ */
1393
+ question: string;
1268
1394
  /**
1269
1395
  * Knowledge Id List
1270
1396
  * knowledge id list
@@ -1274,12 +1400,10 @@ export interface IRetrievalByKnowledgeRequest {
1274
1400
  /** RetrievalBySpaceRequest */
1275
1401
  export interface IRetrievalBySpaceRequest {
1276
1402
  /**
1277
- * Question
1278
- * The query question
1403
+ * Embedding Model Name
1404
+ * The name of the embedding model
1279
1405
  */
1280
- question: string;
1281
- /** The name of the embedding model */
1282
- embedding_model_name: IEmbeddingModelEnum;
1406
+ embedding_model_name: IEmbeddingModelEnum | string;
1283
1407
  /**
1284
1408
  * Similarity Threshold
1285
1409
  * The similarity threshold, ranging from 0.0 to 1.0.
@@ -1301,6 +1425,11 @@ export interface IRetrievalBySpaceRequest {
1301
1425
  * @default {}
1302
1426
  */
1303
1427
  metadata_filter?: Record<string, any>;
1428
+ /**
1429
+ * Question
1430
+ * The query question
1431
+ */
1432
+ question: string;
1304
1433
  /**
1305
1434
  * Space Id List
1306
1435
  * space id list
@@ -1361,10 +1490,23 @@ export interface IRetrievalChunk {
1361
1490
  gmt_modified?: string;
1362
1491
  /**
1363
1492
  * Similarity
1364
- * The similarity of the chunk
1493
+ * The similarity of the chunk, ranging from 0.0 to 1.0.
1365
1494
  */
1366
1495
  similarity: number;
1367
1496
  }
1497
+ /** RetrievalRequest */
1498
+ export interface IRetrievalRequest {
1499
+ /**
1500
+ * Question
1501
+ * The query question
1502
+ */
1503
+ question: string;
1504
+ /**
1505
+ * Config
1506
+ * The configuration for the retrieval request
1507
+ */
1508
+ config: IQueryBySpaceConfig | IQueryByKnowledgeConfig | IQueryByDeepSearch | Record<string, any>;
1509
+ }
1368
1510
  /** S3SourceConfig */
1369
1511
  export interface IS3SourceConfig {
1370
1512
  /**
@@ -1398,10 +1540,10 @@ export interface IS3SourceConfig {
1398
1540
  */
1399
1541
  secret_key?: string | null;
1400
1542
  /**
1401
- * Session Token
1543
+ * Auth Info
1402
1544
  * s3 session token
1403
1545
  */
1404
- session_token?: string | null;
1546
+ auth_info?: string | null;
1405
1547
  }
1406
1548
  /**
1407
1549
  * SpaceCreate
@@ -1409,6 +1551,8 @@ export interface IS3SourceConfig {
1409
1551
  * Attributes:
1410
1552
  * space_name (str): Space name, example: petercat bot group.
1411
1553
  * description (str): descrition of the space resource.
1554
+ * metadata (Dict[str, Any]): metadata of the space resource.such as embedding model name
1555
+ * and other parameters.
1412
1556
  */
1413
1557
  export interface ISpaceCreate {
1414
1558
  /**
@@ -1423,6 +1567,12 @@ export interface ISpaceCreate {
1423
1567
  * @maxLength 255
1424
1568
  */
1425
1569
  description: string;
1570
+ /**
1571
+ * Metadata
1572
+ * metadata of the space resource
1573
+ * @default {}
1574
+ */
1575
+ metadata?: Record<string, any>;
1426
1576
  }
1427
1577
  /**
1428
1578
  * SpaceResponse
@@ -1445,6 +1595,12 @@ export interface ISpaceResponse {
1445
1595
  * @maxLength 255
1446
1596
  */
1447
1597
  description: string;
1598
+ /**
1599
+ * Metadata
1600
+ * metadata of the space resource
1601
+ * @default {}
1602
+ */
1603
+ metadata?: Record<string, any>;
1448
1604
  /**
1449
1605
  * Space Id
1450
1606
  * space id
@@ -1495,6 +1651,16 @@ export interface IStatusStatisticsPageResponseTask {
1495
1651
  * @default 0
1496
1652
  */
1497
1653
  success?: number;
1654
+ /**
1655
+ * Failed
1656
+ * @default 0
1657
+ */
1658
+ failed?: number;
1659
+ /**
1660
+ * Cancelled
1661
+ * @default 0
1662
+ */
1663
+ cancelled?: number;
1498
1664
  }
1499
1665
  /** Task */
1500
1666
  export interface ITask {
@@ -1894,6 +2060,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1894
2060
  * @request POST:/api/retrieval/space
1895
2061
  */
1896
2062
  retrieveSpaceContent: (data: IRetrievalBySpaceRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
2063
+ /**
2064
+ * @description Retrieve chunks within a space_id, for example, given a petercat bot_id, retrieve all chunks under that bot_id.
2065
+ *
2066
+ * @tags retrieval
2067
+ * @name Retrieve
2068
+ * @summary Retrieve
2069
+ * @request POST:/api/retrieval/
2070
+ */
2071
+ retrieve: (data: IRetrievalRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
1897
2072
  };
1898
2073
  task: {
1899
2074
  /**
package/dist/api.js CHANGED
@@ -61,6 +61,9 @@ var IKnowledgeSourceEnum;
61
61
  IKnowledgeSourceEnum["GithubFile"] = "github_file";
62
62
  IKnowledgeSourceEnum["UserInputText"] = "user_input_text";
63
63
  IKnowledgeSourceEnum["UserUploadFile"] = "user_upload_file";
64
+ IKnowledgeSourceEnum["Yuque"] = "yuque";
65
+ IKnowledgeSourceEnum["Youtube"] = "youtube";
66
+ IKnowledgeSourceEnum["Database"] = "database";
64
67
  })(IKnowledgeSourceEnum || (exports.IKnowledgeSourceEnum = IKnowledgeSourceEnum = {}));
65
68
  /** EmbeddingModelEnum */
66
69
  var IEmbeddingModelEnum;
@@ -295,6 +298,15 @@ class Api extends HttpClient {
295
298
  * @request POST:/api/retrieval/space
296
299
  */
297
300
  retrieveSpaceContent: (data, params = {}) => this.request(Object.assign({ path: `/api/retrieval/space`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
301
+ /**
302
+ * @description Retrieve chunks within a space_id, for example, given a petercat bot_id, retrieve all chunks under that bot_id.
303
+ *
304
+ * @tags retrieval
305
+ * @name Retrieve
306
+ * @summary Retrieve
307
+ * @request POST:/api/retrieval/
308
+ */
309
+ retrieve: (data, params = {}) => this.request(Object.assign({ path: `/api/retrieval/`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
298
310
  };
299
311
  this.task = {
300
312
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "0.1.202504281028",
3
+ "version": "0.1.202504301149",
4
4
  "description": "Generated API client (Production)",
5
5
  "main": "dist/api.js",
6
6
  "types": "dist/api.d.ts",
@@ -16,7 +16,7 @@
16
16
  "tag": "latest"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^22.15.2",
19
+ "@types/node": "^22.15.3",
20
20
  "axios": "^1.9.0",
21
21
  "typescript": "^5.8.3"
22
22
  }