@wildix/wim-knowledge-base-client 0.0.53 → 0.0.55
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-cjs/protocols/Aws_restJson1.js +50 -59
- package/dist-es/protocols/Aws_restJson1.js +50 -59
- package/dist-types/commands/GenerateSearchAnswerCommand.d.ts +6 -4
- package/dist-types/commands/ListSearchQueriesHistoryCommand.d.ts +20 -50
- package/dist-types/commands/SearchKnowledgeBaseCommand.d.ts +3 -2
- package/dist-types/models/models_0.d.ts +28 -29
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ const smithy_client_1 = require("@smithy/smithy-client");
|
|
|
10
10
|
const se_CleanDataSourceCommand = async (input, context) => {
|
|
11
11
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
12
12
|
const headers = {};
|
|
13
|
-
b.bp("/api/v1/
|
|
13
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/clean");
|
|
14
14
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
15
15
|
const query = (0, smithy_client_1.map)({
|
|
16
16
|
[_c]: [, input[_cI]],
|
|
@@ -26,7 +26,7 @@ exports.se_CleanDataSourceCommand = se_CleanDataSourceCommand;
|
|
|
26
26
|
const se_CloneDataSourceCommand = async (input, context) => {
|
|
27
27
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
28
|
const headers = {};
|
|
29
|
-
b.bp("/api/v1/
|
|
29
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/clone");
|
|
30
30
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
31
31
|
const query = (0, smithy_client_1.map)({
|
|
32
32
|
[_c]: [, input[_cI]],
|
|
@@ -44,7 +44,7 @@ const se_ConfigureDataSourceCommand = async (input, context) => {
|
|
|
44
44
|
const headers = {
|
|
45
45
|
'content-type': 'application/json',
|
|
46
46
|
};
|
|
47
|
-
b.bp("/api/v1/
|
|
47
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/configure");
|
|
48
48
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
49
49
|
const query = (0, smithy_client_1.map)({
|
|
50
50
|
[_c]: [, input[_cI]],
|
|
@@ -66,7 +66,7 @@ const se_CreateDataSourceCommand = async (input, context) => {
|
|
|
66
66
|
const headers = {
|
|
67
67
|
'content-type': 'application/json',
|
|
68
68
|
};
|
|
69
|
-
b.bp("/api/v1/
|
|
69
|
+
b.bp("/api/v1/data-sources");
|
|
70
70
|
const query = (0, smithy_client_1.map)({
|
|
71
71
|
[_c]: [, input[_cI]],
|
|
72
72
|
});
|
|
@@ -88,7 +88,7 @@ const se_CreateDocumentCommand = async (input, context) => {
|
|
|
88
88
|
const headers = {
|
|
89
89
|
'content-type': 'application/json',
|
|
90
90
|
};
|
|
91
|
-
b.bp("/api/v1/
|
|
91
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents");
|
|
92
92
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
93
93
|
const query = (0, smithy_client_1.map)({
|
|
94
94
|
[_c]: [, input[_cI]],
|
|
@@ -135,7 +135,7 @@ exports.se_CreateKnowledgeBaseCommand = se_CreateKnowledgeBaseCommand;
|
|
|
135
135
|
const se_DeleteDataSourceCommand = async (input, context) => {
|
|
136
136
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
137
137
|
const headers = {};
|
|
138
|
-
b.bp("/api/v1/
|
|
138
|
+
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
139
139
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
140
140
|
const query = (0, smithy_client_1.map)({
|
|
141
141
|
[_c]: [, input[_cI]],
|
|
@@ -151,7 +151,7 @@ exports.se_DeleteDataSourceCommand = se_DeleteDataSourceCommand;
|
|
|
151
151
|
const se_DeleteDocumentCommand = async (input, context) => {
|
|
152
152
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
153
153
|
const headers = {};
|
|
154
|
-
b.bp("/api/v1/
|
|
154
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
155
155
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
156
156
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
157
157
|
const query = (0, smithy_client_1.map)({
|
|
@@ -186,7 +186,7 @@ const se_DescribeDataSourceCommand = async (input, context) => {
|
|
|
186
186
|
const headers = {
|
|
187
187
|
'content-type': 'application/json',
|
|
188
188
|
};
|
|
189
|
-
b.bp("/api/v1/
|
|
189
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/describe");
|
|
190
190
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
191
191
|
const query = (0, smithy_client_1.map)({
|
|
192
192
|
[_c]: [, input[_cI]],
|
|
@@ -216,7 +216,7 @@ const se_GenerateSearchAnswerCommand = async (input, context) => {
|
|
|
216
216
|
'maxOutputTokens': [],
|
|
217
217
|
'model': [],
|
|
218
218
|
'searchQuery': [],
|
|
219
|
-
'searchResults': _ =>
|
|
219
|
+
'searchResults': _ => se_SearchKnowledgeBaseResultsList(_, context),
|
|
220
220
|
'systemPrompt': [],
|
|
221
221
|
'temperature': _ => (0, smithy_client_1.serializeFloat)(_),
|
|
222
222
|
}));
|
|
@@ -230,7 +230,7 @@ exports.se_GenerateSearchAnswerCommand = se_GenerateSearchAnswerCommand;
|
|
|
230
230
|
const se_GetDataSourceCommand = async (input, context) => {
|
|
231
231
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
232
232
|
const headers = {};
|
|
233
|
-
b.bp("/api/v1/
|
|
233
|
+
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
234
234
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
235
235
|
const query = (0, smithy_client_1.map)({
|
|
236
236
|
[_c]: [, input[_cI]],
|
|
@@ -246,7 +246,7 @@ exports.se_GetDataSourceCommand = se_GetDataSourceCommand;
|
|
|
246
246
|
const se_GetDataSourceSyncStatusCommand = async (input, context) => {
|
|
247
247
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
248
248
|
const headers = {};
|
|
249
|
-
b.bp("/api/v1/
|
|
249
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/sync-status");
|
|
250
250
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
251
251
|
const query = (0, smithy_client_1.map)({
|
|
252
252
|
[_c]: [, input[_cI]],
|
|
@@ -262,7 +262,7 @@ exports.se_GetDataSourceSyncStatusCommand = se_GetDataSourceSyncStatusCommand;
|
|
|
262
262
|
const se_GetDocumentCommand = async (input, context) => {
|
|
263
263
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
264
264
|
const headers = {};
|
|
265
|
-
b.bp("/api/v1/
|
|
265
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
266
266
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
267
267
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
268
268
|
const query = (0, smithy_client_1.map)({
|
|
@@ -279,7 +279,7 @@ exports.se_GetDocumentCommand = se_GetDocumentCommand;
|
|
|
279
279
|
const se_GetDocumentChunksCommand = async (input, context) => {
|
|
280
280
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
281
281
|
const headers = {};
|
|
282
|
-
b.bp("/api/v1/
|
|
282
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/chunks");
|
|
283
283
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
284
284
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
285
285
|
const query = (0, smithy_client_1.map)({
|
|
@@ -296,7 +296,7 @@ exports.se_GetDocumentChunksCommand = se_GetDocumentChunksCommand;
|
|
|
296
296
|
const se_GetDocumentDownloadUrlCommand = async (input, context) => {
|
|
297
297
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
298
298
|
const headers = {};
|
|
299
|
-
b.bp("/api/v1/
|
|
299
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/download-url");
|
|
300
300
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
301
301
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
302
302
|
const query = (0, smithy_client_1.map)({
|
|
@@ -313,7 +313,7 @@ exports.se_GetDocumentDownloadUrlCommand = se_GetDocumentDownloadUrlCommand;
|
|
|
313
313
|
const se_GetDocumentMarkdownCommand = async (input, context) => {
|
|
314
314
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
315
315
|
const headers = {};
|
|
316
|
-
b.bp("/api/v1/
|
|
316
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/markdown");
|
|
317
317
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
318
318
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
319
319
|
const query = (0, smithy_client_1.map)({
|
|
@@ -330,7 +330,7 @@ exports.se_GetDocumentMarkdownCommand = se_GetDocumentMarkdownCommand;
|
|
|
330
330
|
const se_GetDocumentUploadUrlCommand = async (input, context) => {
|
|
331
331
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
332
332
|
const headers = {};
|
|
333
|
-
b.bp("/api/v1/
|
|
333
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/upload-url");
|
|
334
334
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
335
335
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
336
336
|
const query = (0, smithy_client_1.map)({
|
|
@@ -347,7 +347,7 @@ exports.se_GetDocumentUploadUrlCommand = se_GetDocumentUploadUrlCommand;
|
|
|
347
347
|
const se_GetDocumentWithContentAndChunksCommand = async (input, context) => {
|
|
348
348
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
349
349
|
const headers = {};
|
|
350
|
-
b.bp("/api/v1/
|
|
350
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/with-content-and-chunks");
|
|
351
351
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
352
352
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
353
353
|
const query = (0, smithy_client_1.map)({
|
|
@@ -380,7 +380,7 @@ exports.se_GetKnowledgeBaseCommand = se_GetKnowledgeBaseCommand;
|
|
|
380
380
|
const se_ListDataSourcesCommand = async (input, context) => {
|
|
381
381
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
382
382
|
const headers = {};
|
|
383
|
-
b.bp("/api/v1/
|
|
383
|
+
b.bp("/api/v1/data-sources");
|
|
384
384
|
const query = (0, smithy_client_1.map)({
|
|
385
385
|
[_c]: [, input[_cI]],
|
|
386
386
|
});
|
|
@@ -395,7 +395,7 @@ exports.se_ListDataSourcesCommand = se_ListDataSourcesCommand;
|
|
|
395
395
|
const se_ListDataSourceStatisticsCommand = async (input, context) => {
|
|
396
396
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
397
397
|
const headers = {};
|
|
398
|
-
b.bp("/api/v1/
|
|
398
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/statistics");
|
|
399
399
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
400
400
|
const query = (0, smithy_client_1.map)({
|
|
401
401
|
[_c]: [, input[_cI]],
|
|
@@ -411,7 +411,7 @@ exports.se_ListDataSourceStatisticsCommand = se_ListDataSourceStatisticsCommand;
|
|
|
411
411
|
const se_ListDataSourceSynchronizationLogsCommand = async (input, context) => {
|
|
412
412
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
413
413
|
const headers = {};
|
|
414
|
-
b.bp("/api/v1/
|
|
414
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/sync-logs");
|
|
415
415
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
416
416
|
const query = (0, smithy_client_1.map)({
|
|
417
417
|
[_c]: [, input[_cI]],
|
|
@@ -432,7 +432,7 @@ exports.se_ListDataSourceSynchronizationLogsCommand = se_ListDataSourceSynchroni
|
|
|
432
432
|
const se_ListDocumentsCommand = async (input, context) => {
|
|
433
433
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
434
434
|
const headers = {};
|
|
435
|
-
b.bp("/api/v1/
|
|
435
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents");
|
|
436
436
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
437
437
|
const query = (0, smithy_client_1.map)({
|
|
438
438
|
[_c]: [, input[_cI]],
|
|
@@ -518,7 +518,7 @@ exports.se_SearchKnowledgeBaseCommand = se_SearchKnowledgeBaseCommand;
|
|
|
518
518
|
const se_StartSyncDataSourceCommand = async (input, context) => {
|
|
519
519
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
520
520
|
const headers = {};
|
|
521
|
-
b.bp("/api/v1/
|
|
521
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/start-sync");
|
|
522
522
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
523
523
|
const query = (0, smithy_client_1.map)({
|
|
524
524
|
[_c]: [, input[_cI]],
|
|
@@ -535,7 +535,7 @@ exports.se_StartSyncDataSourceCommand = se_StartSyncDataSourceCommand;
|
|
|
535
535
|
const se_StopSyncDataSourceCommand = async (input, context) => {
|
|
536
536
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
537
537
|
const headers = {};
|
|
538
|
-
b.bp("/api/v1/
|
|
538
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/stop-sync");
|
|
539
539
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
540
540
|
const query = (0, smithy_client_1.map)({
|
|
541
541
|
[_c]: [, input[_cI]],
|
|
@@ -553,7 +553,7 @@ const se_UpdateDataSourceCommand = async (input, context) => {
|
|
|
553
553
|
const headers = {
|
|
554
554
|
'content-type': 'application/json',
|
|
555
555
|
};
|
|
556
|
-
b.bp("/api/v1/
|
|
556
|
+
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
557
557
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
558
558
|
const query = (0, smithy_client_1.map)({
|
|
559
559
|
[_c]: [, input[_cI]],
|
|
@@ -575,7 +575,7 @@ const se_UpdateDocumentCommand = async (input, context) => {
|
|
|
575
575
|
const headers = {
|
|
576
576
|
'content-type': 'application/json',
|
|
577
577
|
};
|
|
578
|
-
b.bp("/api/v1/
|
|
578
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
579
579
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
580
580
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
581
581
|
const query = (0, smithy_client_1.map)({
|
|
@@ -765,7 +765,7 @@ const de_GenerateSearchAnswerCommand = async (output, context) => {
|
|
|
765
765
|
const doc = (0, smithy_client_1.take)(data, {
|
|
766
766
|
'answer': smithy_client_1.expectString,
|
|
767
767
|
'metadata': smithy_client_1._json,
|
|
768
|
-
'sources': _ =>
|
|
768
|
+
'sources': _ => de_SearchKnowledgeBaseResultsList(_, context),
|
|
769
769
|
});
|
|
770
770
|
Object.assign(contents, doc);
|
|
771
771
|
return contents;
|
|
@@ -996,7 +996,7 @@ const de_ListSearchQueriesHistoryCommand = async (output, context) => {
|
|
|
996
996
|
});
|
|
997
997
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
998
998
|
const doc = (0, smithy_client_1.take)(data, {
|
|
999
|
-
'
|
|
999
|
+
'history': _ => de_SearchHistoryList(_, context),
|
|
1000
1000
|
});
|
|
1001
1001
|
Object.assign(contents, doc);
|
|
1002
1002
|
return contents;
|
|
@@ -1012,7 +1012,7 @@ const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
|
1012
1012
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1013
1013
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1014
1014
|
'metadata': smithy_client_1._json,
|
|
1015
|
-
'results': _ =>
|
|
1015
|
+
'results': _ => de_SearchKnowledgeBaseResultsList(_, context),
|
|
1016
1016
|
});
|
|
1017
1017
|
Object.assign(contents, doc);
|
|
1018
1018
|
return contents;
|
|
@@ -1217,8 +1217,9 @@ const se_DescribeDataSourceParameters = (input, context) => {
|
|
|
1217
1217
|
'proxy': _ => se_Document(_, context),
|
|
1218
1218
|
});
|
|
1219
1219
|
};
|
|
1220
|
-
const
|
|
1220
|
+
const se_SearchKnowledgeBaseResultItem = (input, context) => {
|
|
1221
1221
|
return (0, smithy_client_1.take)(input, {
|
|
1222
|
+
'chunkId': [],
|
|
1222
1223
|
'content': [],
|
|
1223
1224
|
'dataSourceId': [],
|
|
1224
1225
|
'dataSourceType': [],
|
|
@@ -1231,9 +1232,9 @@ const se_SearchKnowledgeBaseResult = (input, context) => {
|
|
|
1231
1232
|
'semanticScore': smithy_client_1.serializeFloat,
|
|
1232
1233
|
});
|
|
1233
1234
|
};
|
|
1234
|
-
const
|
|
1235
|
+
const se_SearchKnowledgeBaseResultsList = (input, context) => {
|
|
1235
1236
|
return input.filter((e) => e != null).map(entry => {
|
|
1236
|
-
return
|
|
1237
|
+
return se_SearchKnowledgeBaseResultItem(entry, context);
|
|
1237
1238
|
});
|
|
1238
1239
|
};
|
|
1239
1240
|
const de_Document = (output, context) => {
|
|
@@ -1284,48 +1285,38 @@ const de_DescribeDataSourceResult = (output, context) => {
|
|
|
1284
1285
|
'proxy': (_) => de_Document(_, context),
|
|
1285
1286
|
});
|
|
1286
1287
|
};
|
|
1287
|
-
const
|
|
1288
|
-
return (0, smithy_client_1.take)(output, {
|
|
1289
|
-
'externalSessionId': smithy_client_1.expectString,
|
|
1290
|
-
'knowledgeBaseId': smithy_client_1.expectString,
|
|
1291
|
-
'query': smithy_client_1.expectString,
|
|
1292
|
-
'searchLimit': smithy_client_1.expectInt32,
|
|
1293
|
-
'searchStrategy': smithy_client_1.expectString,
|
|
1294
|
-
'searchThreshold': smithy_client_1.limitedParseDouble,
|
|
1295
|
-
'user': smithy_client_1.expectString,
|
|
1296
|
-
});
|
|
1297
|
-
};
|
|
1298
|
-
const de_SearchHistoryResponse = (output, context) => {
|
|
1299
|
-
return (0, smithy_client_1.take)(output, {
|
|
1300
|
-
'results': (_) => de_SearchHistorySearchResults(_, context),
|
|
1301
|
-
});
|
|
1302
|
-
};
|
|
1303
|
-
const de_SearchHistoryResultItem = (output, context) => {
|
|
1288
|
+
const de_SearchHistoryItem = (output, context) => {
|
|
1304
1289
|
return (0, smithy_client_1.take)(output, {
|
|
1290
|
+
'chunks': (_) => de_SearchKnowledgeBaseResultsList(_, context),
|
|
1291
|
+
'chunksCount': smithy_client_1.expectInt32,
|
|
1305
1292
|
'companyId': smithy_client_1.expectString,
|
|
1306
1293
|
'createdAt': (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1307
1294
|
'request': (_) => de_SearchHistoryRequest(_, context),
|
|
1308
|
-
'response': (_) => de_SearchHistoryResponse(_, context),
|
|
1309
|
-
'resultsCount': smithy_client_1.expectInt32,
|
|
1310
1295
|
'sessionId': smithy_client_1.expectString,
|
|
1311
1296
|
'stages': smithy_client_1._json,
|
|
1312
1297
|
'totalDuration': smithy_client_1.expectInt32,
|
|
1313
1298
|
});
|
|
1314
1299
|
};
|
|
1315
|
-
const
|
|
1300
|
+
const de_SearchHistoryList = (output, context) => {
|
|
1316
1301
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1317
|
-
return
|
|
1302
|
+
return de_SearchHistoryItem(entry, context);
|
|
1318
1303
|
});
|
|
1319
1304
|
return retVal;
|
|
1320
1305
|
};
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1323
|
-
|
|
1306
|
+
const de_SearchHistoryRequest = (output, context) => {
|
|
1307
|
+
return (0, smithy_client_1.take)(output, {
|
|
1308
|
+
'externalSessionId': smithy_client_1.expectString,
|
|
1309
|
+
'knowledgeBaseId': smithy_client_1.expectString,
|
|
1310
|
+
'query': smithy_client_1.expectString,
|
|
1311
|
+
'searchLimit': smithy_client_1.expectInt32,
|
|
1312
|
+
'searchStrategy': smithy_client_1.expectString,
|
|
1313
|
+
'searchThreshold': smithy_client_1.limitedParseDouble,
|
|
1314
|
+
'user': smithy_client_1.expectString,
|
|
1324
1315
|
});
|
|
1325
|
-
return retVal;
|
|
1326
1316
|
};
|
|
1327
|
-
const
|
|
1317
|
+
const de_SearchKnowledgeBaseResultItem = (output, context) => {
|
|
1328
1318
|
return (0, smithy_client_1.take)(output, {
|
|
1319
|
+
'chunkId': smithy_client_1.expectString,
|
|
1329
1320
|
'content': smithy_client_1.expectString,
|
|
1330
1321
|
'dataSourceId': smithy_client_1.expectString,
|
|
1331
1322
|
'dataSourceType': smithy_client_1.expectString,
|
|
@@ -1338,9 +1329,9 @@ const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
|
1338
1329
|
'semanticScore': smithy_client_1.limitedParseDouble,
|
|
1339
1330
|
});
|
|
1340
1331
|
};
|
|
1341
|
-
const
|
|
1332
|
+
const de_SearchKnowledgeBaseResultsList = (output, context) => {
|
|
1342
1333
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1343
|
-
return
|
|
1334
|
+
return de_SearchKnowledgeBaseResultItem(entry, context);
|
|
1344
1335
|
});
|
|
1345
1336
|
return retVal;
|
|
1346
1337
|
};
|
|
@@ -6,7 +6,7 @@ import { decorateServiceException as __decorateServiceException, expectInt32 as
|
|
|
6
6
|
export const se_CleanDataSourceCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {};
|
|
9
|
-
b.bp("/api/v1/
|
|
9
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/clean");
|
|
10
10
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
11
11
|
const query = map({
|
|
12
12
|
[_c]: [, input[_cI]],
|
|
@@ -21,7 +21,7 @@ export const se_CleanDataSourceCommand = async (input, context) => {
|
|
|
21
21
|
export const se_CloneDataSourceCommand = async (input, context) => {
|
|
22
22
|
const b = rb(input, context);
|
|
23
23
|
const headers = {};
|
|
24
|
-
b.bp("/api/v1/
|
|
24
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/clone");
|
|
25
25
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
26
26
|
const query = map({
|
|
27
27
|
[_c]: [, input[_cI]],
|
|
@@ -38,7 +38,7 @@ export const se_ConfigureDataSourceCommand = async (input, context) => {
|
|
|
38
38
|
const headers = {
|
|
39
39
|
'content-type': 'application/json',
|
|
40
40
|
};
|
|
41
|
-
b.bp("/api/v1/
|
|
41
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/configure");
|
|
42
42
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
43
43
|
const query = map({
|
|
44
44
|
[_c]: [, input[_cI]],
|
|
@@ -59,7 +59,7 @@ export const se_CreateDataSourceCommand = async (input, context) => {
|
|
|
59
59
|
const headers = {
|
|
60
60
|
'content-type': 'application/json',
|
|
61
61
|
};
|
|
62
|
-
b.bp("/api/v1/
|
|
62
|
+
b.bp("/api/v1/data-sources");
|
|
63
63
|
const query = map({
|
|
64
64
|
[_c]: [, input[_cI]],
|
|
65
65
|
});
|
|
@@ -80,7 +80,7 @@ export const se_CreateDocumentCommand = async (input, context) => {
|
|
|
80
80
|
const headers = {
|
|
81
81
|
'content-type': 'application/json',
|
|
82
82
|
};
|
|
83
|
-
b.bp("/api/v1/
|
|
83
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents");
|
|
84
84
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
85
85
|
const query = map({
|
|
86
86
|
[_c]: [, input[_cI]],
|
|
@@ -125,7 +125,7 @@ export const se_CreateKnowledgeBaseCommand = async (input, context) => {
|
|
|
125
125
|
export const se_DeleteDataSourceCommand = async (input, context) => {
|
|
126
126
|
const b = rb(input, context);
|
|
127
127
|
const headers = {};
|
|
128
|
-
b.bp("/api/v1/
|
|
128
|
+
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
129
129
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
130
130
|
const query = map({
|
|
131
131
|
[_c]: [, input[_cI]],
|
|
@@ -140,7 +140,7 @@ export const se_DeleteDataSourceCommand = async (input, context) => {
|
|
|
140
140
|
export const se_DeleteDocumentCommand = async (input, context) => {
|
|
141
141
|
const b = rb(input, context);
|
|
142
142
|
const headers = {};
|
|
143
|
-
b.bp("/api/v1/
|
|
143
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
144
144
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
145
145
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
146
146
|
const query = map({
|
|
@@ -173,7 +173,7 @@ export const se_DescribeDataSourceCommand = async (input, context) => {
|
|
|
173
173
|
const headers = {
|
|
174
174
|
'content-type': 'application/json',
|
|
175
175
|
};
|
|
176
|
-
b.bp("/api/v1/
|
|
176
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/describe");
|
|
177
177
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
178
178
|
const query = map({
|
|
179
179
|
[_c]: [, input[_cI]],
|
|
@@ -202,7 +202,7 @@ export const se_GenerateSearchAnswerCommand = async (input, context) => {
|
|
|
202
202
|
'maxOutputTokens': [],
|
|
203
203
|
'model': [],
|
|
204
204
|
'searchQuery': [],
|
|
205
|
-
'searchResults': _ =>
|
|
205
|
+
'searchResults': _ => se_SearchKnowledgeBaseResultsList(_, context),
|
|
206
206
|
'systemPrompt': [],
|
|
207
207
|
'temperature': _ => __serializeFloat(_),
|
|
208
208
|
}));
|
|
@@ -215,7 +215,7 @@ export const se_GenerateSearchAnswerCommand = async (input, context) => {
|
|
|
215
215
|
export const se_GetDataSourceCommand = async (input, context) => {
|
|
216
216
|
const b = rb(input, context);
|
|
217
217
|
const headers = {};
|
|
218
|
-
b.bp("/api/v1/
|
|
218
|
+
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
219
219
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
220
220
|
const query = map({
|
|
221
221
|
[_c]: [, input[_cI]],
|
|
@@ -230,7 +230,7 @@ export const se_GetDataSourceCommand = async (input, context) => {
|
|
|
230
230
|
export const se_GetDataSourceSyncStatusCommand = async (input, context) => {
|
|
231
231
|
const b = rb(input, context);
|
|
232
232
|
const headers = {};
|
|
233
|
-
b.bp("/api/v1/
|
|
233
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/sync-status");
|
|
234
234
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
235
235
|
const query = map({
|
|
236
236
|
[_c]: [, input[_cI]],
|
|
@@ -245,7 +245,7 @@ export const se_GetDataSourceSyncStatusCommand = async (input, context) => {
|
|
|
245
245
|
export const se_GetDocumentCommand = async (input, context) => {
|
|
246
246
|
const b = rb(input, context);
|
|
247
247
|
const headers = {};
|
|
248
|
-
b.bp("/api/v1/
|
|
248
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
249
249
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
250
250
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
251
251
|
const query = map({
|
|
@@ -261,7 +261,7 @@ export const se_GetDocumentCommand = async (input, context) => {
|
|
|
261
261
|
export const se_GetDocumentChunksCommand = async (input, context) => {
|
|
262
262
|
const b = rb(input, context);
|
|
263
263
|
const headers = {};
|
|
264
|
-
b.bp("/api/v1/
|
|
264
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/chunks");
|
|
265
265
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
266
266
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
267
267
|
const query = map({
|
|
@@ -277,7 +277,7 @@ export const se_GetDocumentChunksCommand = async (input, context) => {
|
|
|
277
277
|
export const se_GetDocumentDownloadUrlCommand = async (input, context) => {
|
|
278
278
|
const b = rb(input, context);
|
|
279
279
|
const headers = {};
|
|
280
|
-
b.bp("/api/v1/
|
|
280
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/download-url");
|
|
281
281
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
282
282
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
283
283
|
const query = map({
|
|
@@ -293,7 +293,7 @@ export const se_GetDocumentDownloadUrlCommand = async (input, context) => {
|
|
|
293
293
|
export const se_GetDocumentMarkdownCommand = async (input, context) => {
|
|
294
294
|
const b = rb(input, context);
|
|
295
295
|
const headers = {};
|
|
296
|
-
b.bp("/api/v1/
|
|
296
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/markdown");
|
|
297
297
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
298
298
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
299
299
|
const query = map({
|
|
@@ -309,7 +309,7 @@ export const se_GetDocumentMarkdownCommand = async (input, context) => {
|
|
|
309
309
|
export const se_GetDocumentUploadUrlCommand = async (input, context) => {
|
|
310
310
|
const b = rb(input, context);
|
|
311
311
|
const headers = {};
|
|
312
|
-
b.bp("/api/v1/
|
|
312
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/upload-url");
|
|
313
313
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
314
314
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
315
315
|
const query = map({
|
|
@@ -325,7 +325,7 @@ export const se_GetDocumentUploadUrlCommand = async (input, context) => {
|
|
|
325
325
|
export const se_GetDocumentWithContentAndChunksCommand = async (input, context) => {
|
|
326
326
|
const b = rb(input, context);
|
|
327
327
|
const headers = {};
|
|
328
|
-
b.bp("/api/v1/
|
|
328
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/with-content-and-chunks");
|
|
329
329
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
330
330
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
331
331
|
const query = map({
|
|
@@ -356,7 +356,7 @@ export const se_GetKnowledgeBaseCommand = async (input, context) => {
|
|
|
356
356
|
export const se_ListDataSourcesCommand = async (input, context) => {
|
|
357
357
|
const b = rb(input, context);
|
|
358
358
|
const headers = {};
|
|
359
|
-
b.bp("/api/v1/
|
|
359
|
+
b.bp("/api/v1/data-sources");
|
|
360
360
|
const query = map({
|
|
361
361
|
[_c]: [, input[_cI]],
|
|
362
362
|
});
|
|
@@ -370,7 +370,7 @@ export const se_ListDataSourcesCommand = async (input, context) => {
|
|
|
370
370
|
export const se_ListDataSourceStatisticsCommand = async (input, context) => {
|
|
371
371
|
const b = rb(input, context);
|
|
372
372
|
const headers = {};
|
|
373
|
-
b.bp("/api/v1/
|
|
373
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/statistics");
|
|
374
374
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
375
375
|
const query = map({
|
|
376
376
|
[_c]: [, input[_cI]],
|
|
@@ -385,7 +385,7 @@ export const se_ListDataSourceStatisticsCommand = async (input, context) => {
|
|
|
385
385
|
export const se_ListDataSourceSynchronizationLogsCommand = async (input, context) => {
|
|
386
386
|
const b = rb(input, context);
|
|
387
387
|
const headers = {};
|
|
388
|
-
b.bp("/api/v1/
|
|
388
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/sync-logs");
|
|
389
389
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
390
390
|
const query = map({
|
|
391
391
|
[_c]: [, input[_cI]],
|
|
@@ -405,7 +405,7 @@ export const se_ListDataSourceSynchronizationLogsCommand = async (input, context
|
|
|
405
405
|
export const se_ListDocumentsCommand = async (input, context) => {
|
|
406
406
|
const b = rb(input, context);
|
|
407
407
|
const headers = {};
|
|
408
|
-
b.bp("/api/v1/
|
|
408
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents");
|
|
409
409
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
410
410
|
const query = map({
|
|
411
411
|
[_c]: [, input[_cI]],
|
|
@@ -487,7 +487,7 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
487
487
|
export const se_StartSyncDataSourceCommand = async (input, context) => {
|
|
488
488
|
const b = rb(input, context);
|
|
489
489
|
const headers = {};
|
|
490
|
-
b.bp("/api/v1/
|
|
490
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/start-sync");
|
|
491
491
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
492
492
|
const query = map({
|
|
493
493
|
[_c]: [, input[_cI]],
|
|
@@ -503,7 +503,7 @@ export const se_StartSyncDataSourceCommand = async (input, context) => {
|
|
|
503
503
|
export const se_StopSyncDataSourceCommand = async (input, context) => {
|
|
504
504
|
const b = rb(input, context);
|
|
505
505
|
const headers = {};
|
|
506
|
-
b.bp("/api/v1/
|
|
506
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/stop-sync");
|
|
507
507
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
508
508
|
const query = map({
|
|
509
509
|
[_c]: [, input[_cI]],
|
|
@@ -520,7 +520,7 @@ export const se_UpdateDataSourceCommand = async (input, context) => {
|
|
|
520
520
|
const headers = {
|
|
521
521
|
'content-type': 'application/json',
|
|
522
522
|
};
|
|
523
|
-
b.bp("/api/v1/
|
|
523
|
+
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
524
524
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
525
525
|
const query = map({
|
|
526
526
|
[_c]: [, input[_cI]],
|
|
@@ -541,7 +541,7 @@ export const se_UpdateDocumentCommand = async (input, context) => {
|
|
|
541
541
|
const headers = {
|
|
542
542
|
'content-type': 'application/json',
|
|
543
543
|
};
|
|
544
|
-
b.bp("/api/v1/
|
|
544
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
545
545
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
546
546
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
547
547
|
const query = map({
|
|
@@ -719,7 +719,7 @@ export const de_GenerateSearchAnswerCommand = async (output, context) => {
|
|
|
719
719
|
const doc = take(data, {
|
|
720
720
|
'answer': __expectString,
|
|
721
721
|
'metadata': _json,
|
|
722
|
-
'sources': _ =>
|
|
722
|
+
'sources': _ => de_SearchKnowledgeBaseResultsList(_, context),
|
|
723
723
|
});
|
|
724
724
|
Object.assign(contents, doc);
|
|
725
725
|
return contents;
|
|
@@ -935,7 +935,7 @@ export const de_ListSearchQueriesHistoryCommand = async (output, context) => {
|
|
|
935
935
|
});
|
|
936
936
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
937
937
|
const doc = take(data, {
|
|
938
|
-
'
|
|
938
|
+
'history': _ => de_SearchHistoryList(_, context),
|
|
939
939
|
});
|
|
940
940
|
Object.assign(contents, doc);
|
|
941
941
|
return contents;
|
|
@@ -950,7 +950,7 @@ export const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
|
950
950
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
951
951
|
const doc = take(data, {
|
|
952
952
|
'metadata': _json,
|
|
953
|
-
'results': _ =>
|
|
953
|
+
'results': _ => de_SearchKnowledgeBaseResultsList(_, context),
|
|
954
954
|
});
|
|
955
955
|
Object.assign(contents, doc);
|
|
956
956
|
return contents;
|
|
@@ -1149,8 +1149,9 @@ const se_DescribeDataSourceParameters = (input, context) => {
|
|
|
1149
1149
|
'proxy': _ => se_Document(_, context),
|
|
1150
1150
|
});
|
|
1151
1151
|
};
|
|
1152
|
-
const
|
|
1152
|
+
const se_SearchKnowledgeBaseResultItem = (input, context) => {
|
|
1153
1153
|
return take(input, {
|
|
1154
|
+
'chunkId': [],
|
|
1154
1155
|
'content': [],
|
|
1155
1156
|
'dataSourceId': [],
|
|
1156
1157
|
'dataSourceType': [],
|
|
@@ -1163,9 +1164,9 @@ const se_SearchKnowledgeBaseResult = (input, context) => {
|
|
|
1163
1164
|
'semanticScore': __serializeFloat,
|
|
1164
1165
|
});
|
|
1165
1166
|
};
|
|
1166
|
-
const
|
|
1167
|
+
const se_SearchKnowledgeBaseResultsList = (input, context) => {
|
|
1167
1168
|
return input.filter((e) => e != null).map(entry => {
|
|
1168
|
-
return
|
|
1169
|
+
return se_SearchKnowledgeBaseResultItem(entry, context);
|
|
1169
1170
|
});
|
|
1170
1171
|
};
|
|
1171
1172
|
const de_Document = (output, context) => {
|
|
@@ -1216,48 +1217,38 @@ const de_DescribeDataSourceResult = (output, context) => {
|
|
|
1216
1217
|
'proxy': (_) => de_Document(_, context),
|
|
1217
1218
|
});
|
|
1218
1219
|
};
|
|
1219
|
-
const
|
|
1220
|
-
return take(output, {
|
|
1221
|
-
'externalSessionId': __expectString,
|
|
1222
|
-
'knowledgeBaseId': __expectString,
|
|
1223
|
-
'query': __expectString,
|
|
1224
|
-
'searchLimit': __expectInt32,
|
|
1225
|
-
'searchStrategy': __expectString,
|
|
1226
|
-
'searchThreshold': __limitedParseDouble,
|
|
1227
|
-
'user': __expectString,
|
|
1228
|
-
});
|
|
1229
|
-
};
|
|
1230
|
-
const de_SearchHistoryResponse = (output, context) => {
|
|
1231
|
-
return take(output, {
|
|
1232
|
-
'results': (_) => de_SearchHistorySearchResults(_, context),
|
|
1233
|
-
});
|
|
1234
|
-
};
|
|
1235
|
-
const de_SearchHistoryResultItem = (output, context) => {
|
|
1220
|
+
const de_SearchHistoryItem = (output, context) => {
|
|
1236
1221
|
return take(output, {
|
|
1222
|
+
'chunks': (_) => de_SearchKnowledgeBaseResultsList(_, context),
|
|
1223
|
+
'chunksCount': __expectInt32,
|
|
1237
1224
|
'companyId': __expectString,
|
|
1238
1225
|
'createdAt': (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1239
1226
|
'request': (_) => de_SearchHistoryRequest(_, context),
|
|
1240
|
-
'response': (_) => de_SearchHistoryResponse(_, context),
|
|
1241
|
-
'resultsCount': __expectInt32,
|
|
1242
1227
|
'sessionId': __expectString,
|
|
1243
1228
|
'stages': _json,
|
|
1244
1229
|
'totalDuration': __expectInt32,
|
|
1245
1230
|
});
|
|
1246
1231
|
};
|
|
1247
|
-
const
|
|
1232
|
+
const de_SearchHistoryList = (output, context) => {
|
|
1248
1233
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1249
|
-
return
|
|
1234
|
+
return de_SearchHistoryItem(entry, context);
|
|
1250
1235
|
});
|
|
1251
1236
|
return retVal;
|
|
1252
1237
|
};
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
|
|
1238
|
+
const de_SearchHistoryRequest = (output, context) => {
|
|
1239
|
+
return take(output, {
|
|
1240
|
+
'externalSessionId': __expectString,
|
|
1241
|
+
'knowledgeBaseId': __expectString,
|
|
1242
|
+
'query': __expectString,
|
|
1243
|
+
'searchLimit': __expectInt32,
|
|
1244
|
+
'searchStrategy': __expectString,
|
|
1245
|
+
'searchThreshold': __limitedParseDouble,
|
|
1246
|
+
'user': __expectString,
|
|
1256
1247
|
});
|
|
1257
|
-
return retVal;
|
|
1258
1248
|
};
|
|
1259
|
-
const
|
|
1249
|
+
const de_SearchKnowledgeBaseResultItem = (output, context) => {
|
|
1260
1250
|
return take(output, {
|
|
1251
|
+
'chunkId': __expectString,
|
|
1261
1252
|
'content': __expectString,
|
|
1262
1253
|
'dataSourceId': __expectString,
|
|
1263
1254
|
'dataSourceType': __expectString,
|
|
@@ -1270,9 +1261,9 @@ const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
|
1270
1261
|
'semanticScore': __limitedParseDouble,
|
|
1271
1262
|
});
|
|
1272
1263
|
};
|
|
1273
|
-
const
|
|
1264
|
+
const de_SearchKnowledgeBaseResultsList = (output, context) => {
|
|
1274
1265
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1275
|
-
return
|
|
1266
|
+
return de_SearchKnowledgeBaseResultItem(entry, context);
|
|
1276
1267
|
});
|
|
1277
1268
|
return retVal;
|
|
1278
1269
|
};
|
|
@@ -37,8 +37,9 @@ declare const GenerateSearchAnswerCommand_base: {
|
|
|
37
37
|
* const input = { // GenerateSearchAnswerInput
|
|
38
38
|
* companyId: "STRING_VALUE",
|
|
39
39
|
* searchQuery: "STRING_VALUE", // required
|
|
40
|
-
* searchResults: [ //
|
|
41
|
-
* { //
|
|
40
|
+
* searchResults: [ // SearchKnowledgeBaseResultsList // required
|
|
41
|
+
* { // SearchKnowledgeBaseResultItem
|
|
42
|
+
* chunkId: "STRING_VALUE", // required
|
|
42
43
|
* documentId: "STRING_VALUE", // required
|
|
43
44
|
* documentTitle: "STRING_VALUE", // required
|
|
44
45
|
* documentUrl: "STRING_VALUE", // required
|
|
@@ -68,8 +69,9 @@ declare const GenerateSearchAnswerCommand_base: {
|
|
|
68
69
|
* // outputTokens: Number("int"), // required
|
|
69
70
|
* // duration: Number("int"), // required
|
|
70
71
|
* // },
|
|
71
|
-
* // sources: [ //
|
|
72
|
-
* // { //
|
|
72
|
+
* // sources: [ // SearchKnowledgeBaseResultsList // required
|
|
73
|
+
* // { // SearchKnowledgeBaseResultItem
|
|
74
|
+
* // chunkId: "STRING_VALUE", // required
|
|
73
75
|
* // documentId: "STRING_VALUE", // required
|
|
74
76
|
* // documentTitle: "STRING_VALUE", // required
|
|
75
77
|
* // documentUrl: "STRING_VALUE", // required
|
|
@@ -51,8 +51,8 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
51
51
|
* const command = new ListSearchQueriesHistoryCommand(input);
|
|
52
52
|
* const response = await client.send(command);
|
|
53
53
|
* // { // ListSearchQueriesHistoryOutput
|
|
54
|
-
* //
|
|
55
|
-
* // { //
|
|
54
|
+
* // history: [ // SearchHistoryList // required
|
|
55
|
+
* // { // SearchHistoryItem
|
|
56
56
|
* // sessionId: "STRING_VALUE", // required
|
|
57
57
|
* // companyId: "STRING_VALUE", // required
|
|
58
58
|
* // request: { // SearchHistoryRequest
|
|
@@ -90,56 +90,26 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
90
90
|
* // duration: Number("int"), // required
|
|
91
91
|
* // },
|
|
92
92
|
* // },
|
|
93
|
-
* //
|
|
94
|
-
* //
|
|
95
|
-
* //
|
|
96
|
-
* //
|
|
97
|
-
* //
|
|
98
|
-
* //
|
|
99
|
-
* //
|
|
100
|
-
* //
|
|
101
|
-
* //
|
|
102
|
-
* //
|
|
103
|
-
* //
|
|
104
|
-
* //
|
|
105
|
-
* //
|
|
106
|
-
* //
|
|
107
|
-
* //
|
|
108
|
-
* //
|
|
109
|
-
* //
|
|
110
|
-
* // endTime: Number("long"), // required
|
|
111
|
-
* // duration: Number("int"), // required
|
|
112
|
-
* // },
|
|
113
|
-
* // generateQueryEmbedding: {
|
|
114
|
-
* // startTime: Number("long"), // required
|
|
115
|
-
* // endTime: Number("long"), // required
|
|
116
|
-
* // duration: Number("int"), // required
|
|
117
|
-
* // provider: "STRING_VALUE", // required
|
|
118
|
-
* // model: "STRING_VALUE", // required
|
|
119
|
-
* // inputTokens: Number("int"), // required
|
|
120
|
-
* // outputTokens: Number("int"), // required
|
|
121
|
-
* // },
|
|
122
|
-
* // search: {
|
|
123
|
-
* // startTime: Number("long"), // required
|
|
124
|
-
* // endTime: Number("long"), // required
|
|
125
|
-
* // duration: Number("int"), // required
|
|
126
|
-
* // },
|
|
127
|
-
* // enrichData: "<SearchHistoryStage>",
|
|
128
|
-
* // },
|
|
129
|
-
* // response: {
|
|
130
|
-
* // results: [ // required
|
|
131
|
-
* // "<SearchHistoryResultItem>",
|
|
132
|
-
* // ],
|
|
133
|
-
* // },
|
|
134
|
-
* // createdAt: new Date("TIMESTAMP"), // required
|
|
135
|
-
* // totalDuration: Number("int"), // required
|
|
136
|
-
* // resultsCount: Number("int"), // required
|
|
137
|
-
* // },
|
|
138
|
-
* // ],
|
|
139
|
-
* // },
|
|
93
|
+
* // chunks: [ // SearchKnowledgeBaseResultsList // required
|
|
94
|
+
* // { // SearchKnowledgeBaseResultItem
|
|
95
|
+
* // chunkId: "STRING_VALUE", // required
|
|
96
|
+
* // documentId: "STRING_VALUE", // required
|
|
97
|
+
* // documentTitle: "STRING_VALUE", // required
|
|
98
|
+
* // documentUrl: "STRING_VALUE", // required
|
|
99
|
+
* // dataSourceId: "STRING_VALUE", // required
|
|
100
|
+
* // dataSourceType: "files" || "confluence" || "gdrive", // required
|
|
101
|
+
* // content: "STRING_VALUE", // required
|
|
102
|
+
* // score: Number("double"), // required
|
|
103
|
+
* // fullTextScore: Number("double"),
|
|
104
|
+
* // semanticScore: Number("double"),
|
|
105
|
+
* // documentHierarchy: [ // StringList
|
|
106
|
+
* // "STRING_VALUE",
|
|
107
|
+
* // ],
|
|
108
|
+
* // },
|
|
109
|
+
* // ],
|
|
140
110
|
* // createdAt: new Date("TIMESTAMP"), // required
|
|
141
111
|
* // totalDuration: Number("int"), // required
|
|
142
|
-
* //
|
|
112
|
+
* // chunksCount: Number("int"), // required
|
|
143
113
|
* // },
|
|
144
114
|
* // ],
|
|
145
115
|
* // };
|
|
@@ -48,8 +48,9 @@ declare const SearchKnowledgeBaseCommand_base: {
|
|
|
48
48
|
* const command = new SearchKnowledgeBaseCommand(input);
|
|
49
49
|
* const response = await client.send(command);
|
|
50
50
|
* // { // SearchKnowledgeBaseOutput
|
|
51
|
-
* // results: [ //
|
|
52
|
-
* // { //
|
|
51
|
+
* // results: [ // SearchKnowledgeBaseResultsList // required
|
|
52
|
+
* // { // SearchKnowledgeBaseResultItem
|
|
53
|
+
* // chunkId: "STRING_VALUE", // required
|
|
53
54
|
* // documentId: "STRING_VALUE", // required
|
|
54
55
|
* // documentTitle: "STRING_VALUE", // required
|
|
55
56
|
* // documentUrl: "STRING_VALUE", // required
|
|
@@ -944,7 +944,12 @@ export interface DescribeDataSourceOutput {
|
|
|
944
944
|
/**
|
|
945
945
|
* @public
|
|
946
946
|
*/
|
|
947
|
-
export interface
|
|
947
|
+
export interface SearchKnowledgeBaseResultItem {
|
|
948
|
+
/**
|
|
949
|
+
* The ID of the chunk. Example: 123e4567-e89b-12d3-a456-426614174000
|
|
950
|
+
* @public
|
|
951
|
+
*/
|
|
952
|
+
chunkId: string;
|
|
948
953
|
/**
|
|
949
954
|
* Unique identifier of the document
|
|
950
955
|
* @public
|
|
@@ -998,7 +1003,7 @@ export interface GenerateSearchAnswerInput {
|
|
|
998
1003
|
* The search results to be used to generate the answer. The LLM will use the search results to generate an answer based on the found results.
|
|
999
1004
|
* @public
|
|
1000
1005
|
*/
|
|
1001
|
-
searchResults: (
|
|
1006
|
+
searchResults: (SearchKnowledgeBaseResultItem)[];
|
|
1002
1007
|
/**
|
|
1003
1008
|
* The specific provider and model identifier. Examples: 'openai/gpt-4o' or 'openai/gpt-4o-mini' for OpenAI, 'mistral/mistral-small-2506' for Mistral. Check provider documentation for available models
|
|
1004
1009
|
* @public
|
|
@@ -1026,7 +1031,7 @@ export interface GenerateSearchAnswerInput {
|
|
|
1026
1031
|
export interface GenerateSearchAnswerOutput {
|
|
1027
1032
|
answer: string;
|
|
1028
1033
|
metadata: AnswerMetadata;
|
|
1029
|
-
sources: (
|
|
1034
|
+
sources: (SearchKnowledgeBaseResultItem)[];
|
|
1030
1035
|
}
|
|
1031
1036
|
/**
|
|
1032
1037
|
* @public
|
|
@@ -1540,6 +1545,25 @@ export interface SearchHistoryStages {
|
|
|
1540
1545
|
search?: SearchHistoryStage | undefined;
|
|
1541
1546
|
enrichData?: SearchHistoryStage | undefined;
|
|
1542
1547
|
}
|
|
1548
|
+
/**
|
|
1549
|
+
* @public
|
|
1550
|
+
*/
|
|
1551
|
+
export interface SearchHistoryItem {
|
|
1552
|
+
sessionId: string;
|
|
1553
|
+
companyId: string;
|
|
1554
|
+
request: SearchHistoryRequest;
|
|
1555
|
+
stages: SearchHistoryStages;
|
|
1556
|
+
chunks: (SearchKnowledgeBaseResultItem)[];
|
|
1557
|
+
createdAt: Date;
|
|
1558
|
+
totalDuration: number;
|
|
1559
|
+
chunksCount: number;
|
|
1560
|
+
}
|
|
1561
|
+
/**
|
|
1562
|
+
* @public
|
|
1563
|
+
*/
|
|
1564
|
+
export interface ListSearchQueriesHistoryOutput {
|
|
1565
|
+
history: (SearchHistoryItem)[];
|
|
1566
|
+
}
|
|
1543
1567
|
/**
|
|
1544
1568
|
* @public
|
|
1545
1569
|
* @enum
|
|
@@ -1614,7 +1638,7 @@ export interface SearchResultMetadata {
|
|
|
1614
1638
|
* @public
|
|
1615
1639
|
*/
|
|
1616
1640
|
export interface SearchKnowledgeBaseOutput {
|
|
1617
|
-
results: (
|
|
1641
|
+
results: (SearchKnowledgeBaseResultItem)[];
|
|
1618
1642
|
metadata: SearchResultMetadata;
|
|
1619
1643
|
}
|
|
1620
1644
|
/**
|
|
@@ -1785,28 +1809,3 @@ export interface UpdateKnowledgeBaseInput {
|
|
|
1785
1809
|
export interface UpdateKnowledgeBaseOutput {
|
|
1786
1810
|
knowledgeBase: KnowledgeBaseItem;
|
|
1787
1811
|
}
|
|
1788
|
-
/**
|
|
1789
|
-
* @public
|
|
1790
|
-
*/
|
|
1791
|
-
export interface SearchHistoryResponse {
|
|
1792
|
-
results: (SearchHistoryResultItem)[];
|
|
1793
|
-
}
|
|
1794
|
-
/**
|
|
1795
|
-
* @public
|
|
1796
|
-
*/
|
|
1797
|
-
export interface SearchHistoryResultItem {
|
|
1798
|
-
sessionId: string;
|
|
1799
|
-
companyId: string;
|
|
1800
|
-
request: SearchHistoryRequest;
|
|
1801
|
-
stages: SearchHistoryStages;
|
|
1802
|
-
response: SearchHistoryResponse;
|
|
1803
|
-
createdAt: Date;
|
|
1804
|
-
totalDuration: number;
|
|
1805
|
-
resultsCount: number;
|
|
1806
|
-
}
|
|
1807
|
-
/**
|
|
1808
|
-
* @public
|
|
1809
|
-
*/
|
|
1810
|
-
export interface ListSearchQueriesHistoryOutput {
|
|
1811
|
-
results: (SearchHistoryResultItem)[];
|
|
1812
|
-
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-knowledge-base-client",
|
|
3
3
|
"description": "@wildix/wim-knowledge-base-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.55",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|