@wildix/wim-knowledge-base-client 0.0.56 → 0.0.59
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.
|
@@ -1287,11 +1287,11 @@ const de_DescribeDataSourceResult = (output, context) => {
|
|
|
1287
1287
|
};
|
|
1288
1288
|
const de_SearchHistoryItem = (output, context) => {
|
|
1289
1289
|
return (0, smithy_client_1.take)(output, {
|
|
1290
|
-
'chunksCount': smithy_client_1.expectInt32,
|
|
1291
1290
|
'companyId': smithy_client_1.expectString,
|
|
1292
|
-
'createdAt':
|
|
1291
|
+
'createdAt': smithy_client_1.expectString,
|
|
1293
1292
|
'request': (_) => de_SearchHistoryRequest(_, context),
|
|
1294
1293
|
'results': (_) => de_SearchHistoryResultsList(_, context),
|
|
1294
|
+
'resultsCount': smithy_client_1.expectInt32,
|
|
1295
1295
|
'sessionId': smithy_client_1.expectString,
|
|
1296
1296
|
'stages': smithy_client_1._json,
|
|
1297
1297
|
'totalDuration': smithy_client_1.expectInt32,
|
|
@@ -1314,9 +1314,23 @@ const de_SearchHistoryRequest = (output, context) => {
|
|
|
1314
1314
|
'user': smithy_client_1.expectString,
|
|
1315
1315
|
});
|
|
1316
1316
|
};
|
|
1317
|
+
const de_SearchHistoryResultItem = (output, context) => {
|
|
1318
|
+
return (0, smithy_client_1.take)(output, {
|
|
1319
|
+
'chunkId': smithy_client_1.expectString,
|
|
1320
|
+
'dataSourceId': smithy_client_1.expectString,
|
|
1321
|
+
'dataSourceType': smithy_client_1.expectString,
|
|
1322
|
+
'documentHierarchy': smithy_client_1._json,
|
|
1323
|
+
'documentId': smithy_client_1.expectString,
|
|
1324
|
+
'documentTitle': smithy_client_1.expectString,
|
|
1325
|
+
'documentUrl': smithy_client_1.expectString,
|
|
1326
|
+
'fullTextScore': smithy_client_1.limitedParseDouble,
|
|
1327
|
+
'score': smithy_client_1.limitedParseDouble,
|
|
1328
|
+
'semanticScore': smithy_client_1.limitedParseDouble,
|
|
1329
|
+
});
|
|
1330
|
+
};
|
|
1317
1331
|
const de_SearchHistoryResultsList = (output, context) => {
|
|
1318
1332
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1319
|
-
return
|
|
1333
|
+
return de_SearchHistoryResultItem(entry, context);
|
|
1320
1334
|
});
|
|
1321
1335
|
return retVal;
|
|
1322
1336
|
};
|
|
@@ -2,7 +2,7 @@ import { KnowledgeBaseServiceException as __BaseException } from "../models/Know
|
|
|
2
2
|
import { DataSourceConfig, DataSourceNotFoundException, DocumentNotFoundException, ForbiddenException, KnowledgeBaseNotFoundException, UnauthorizedException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull,
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
6
|
export const se_CleanDataSourceCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {};
|
|
@@ -1219,11 +1219,11 @@ const de_DescribeDataSourceResult = (output, context) => {
|
|
|
1219
1219
|
};
|
|
1220
1220
|
const de_SearchHistoryItem = (output, context) => {
|
|
1221
1221
|
return take(output, {
|
|
1222
|
-
'chunksCount': __expectInt32,
|
|
1223
1222
|
'companyId': __expectString,
|
|
1224
|
-
'createdAt':
|
|
1223
|
+
'createdAt': __expectString,
|
|
1225
1224
|
'request': (_) => de_SearchHistoryRequest(_, context),
|
|
1226
1225
|
'results': (_) => de_SearchHistoryResultsList(_, context),
|
|
1226
|
+
'resultsCount': __expectInt32,
|
|
1227
1227
|
'sessionId': __expectString,
|
|
1228
1228
|
'stages': _json,
|
|
1229
1229
|
'totalDuration': __expectInt32,
|
|
@@ -1246,9 +1246,23 @@ const de_SearchHistoryRequest = (output, context) => {
|
|
|
1246
1246
|
'user': __expectString,
|
|
1247
1247
|
});
|
|
1248
1248
|
};
|
|
1249
|
+
const de_SearchHistoryResultItem = (output, context) => {
|
|
1250
|
+
return take(output, {
|
|
1251
|
+
'chunkId': __expectString,
|
|
1252
|
+
'dataSourceId': __expectString,
|
|
1253
|
+
'dataSourceType': __expectString,
|
|
1254
|
+
'documentHierarchy': _json,
|
|
1255
|
+
'documentId': __expectString,
|
|
1256
|
+
'documentTitle': __expectString,
|
|
1257
|
+
'documentUrl': __expectString,
|
|
1258
|
+
'fullTextScore': __limitedParseDouble,
|
|
1259
|
+
'score': __limitedParseDouble,
|
|
1260
|
+
'semanticScore': __limitedParseDouble,
|
|
1261
|
+
});
|
|
1262
|
+
};
|
|
1249
1263
|
const de_SearchHistoryResultsList = (output, context) => {
|
|
1250
1264
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1251
|
-
return
|
|
1265
|
+
return de_SearchHistoryResultItem(entry, context);
|
|
1252
1266
|
});
|
|
1253
1267
|
return retVal;
|
|
1254
1268
|
};
|
|
@@ -65,33 +65,41 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
65
65
|
* // searchThreshold: Number("double"), // required
|
|
66
66
|
* // },
|
|
67
67
|
* // stages: { // SearchHistoryStages
|
|
68
|
-
* // overall: { //
|
|
68
|
+
* // overall: { // SearchHistoryOverallStage
|
|
69
69
|
* // startTime: Number("long"), // required
|
|
70
70
|
* // endTime: Number("long"), // required
|
|
71
71
|
* // duration: Number("int"), // required
|
|
72
72
|
* // },
|
|
73
|
+
* // transformQuery: { // SearchHistoryTransformQueryStage
|
|
74
|
+
* // startTime: Number("long"), // required
|
|
75
|
+
* // endTime: Number("long"), // required
|
|
76
|
+
* // duration: Number("int"), // required
|
|
77
|
+
* // model: "STRING_VALUE", // required
|
|
78
|
+
* // inputTokens: Number("int"), // required
|
|
79
|
+
* // outputTokens: Number("int"), // required
|
|
80
|
+
* // transformedQuery: "STRING_VALUE", // required
|
|
81
|
+
* // },
|
|
73
82
|
* // generateQueryEmbedding: { // SearchHistoryEmbeddingStage
|
|
74
83
|
* // startTime: Number("long"), // required
|
|
75
84
|
* // endTime: Number("long"), // required
|
|
76
85
|
* // duration: Number("int"), // required
|
|
77
|
-
* // provider: "STRING_VALUE", // required
|
|
78
86
|
* // model: "STRING_VALUE", // required
|
|
79
87
|
* // inputTokens: Number("int"), // required
|
|
80
88
|
* // outputTokens: Number("int"), // required
|
|
81
89
|
* // },
|
|
82
|
-
* // search: {
|
|
90
|
+
* // search: { // SearchHistorySearchStage
|
|
83
91
|
* // startTime: Number("long"), // required
|
|
84
92
|
* // endTime: Number("long"), // required
|
|
85
93
|
* // duration: Number("int"), // required
|
|
86
94
|
* // },
|
|
87
|
-
* // enrichData: {
|
|
95
|
+
* // enrichData: { // SearchEnrichDataStage
|
|
88
96
|
* // startTime: Number("long"), // required
|
|
89
97
|
* // endTime: Number("long"), // required
|
|
90
98
|
* // duration: Number("int"), // required
|
|
91
99
|
* // },
|
|
92
100
|
* // },
|
|
93
101
|
* // results: [ // SearchHistoryResultsList // required
|
|
94
|
-
* // { //
|
|
102
|
+
* // { // SearchHistoryResultItem
|
|
95
103
|
* // chunkId: "STRING_VALUE", // required
|
|
96
104
|
* // documentId: "STRING_VALUE", // required
|
|
97
105
|
* // documentTitle: "STRING_VALUE", // required
|
|
@@ -104,12 +112,11 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
104
112
|
* // documentHierarchy: [ // StringList
|
|
105
113
|
* // "STRING_VALUE",
|
|
106
114
|
* // ],
|
|
107
|
-
* // content: "STRING_VALUE", // required
|
|
108
115
|
* // },
|
|
109
116
|
* // ],
|
|
110
|
-
* // createdAt:
|
|
117
|
+
* // createdAt: "STRING_VALUE", // required
|
|
111
118
|
* // totalDuration: Number("int"), // required
|
|
112
|
-
* //
|
|
119
|
+
* // resultsCount: Number("int"), // required
|
|
113
120
|
* // },
|
|
114
121
|
* // ],
|
|
115
122
|
* // };
|
|
@@ -1519,7 +1519,50 @@ export interface SearchHistoryRequest {
|
|
|
1519
1519
|
/**
|
|
1520
1520
|
* @public
|
|
1521
1521
|
*/
|
|
1522
|
-
export interface
|
|
1522
|
+
export interface SearchHistoryResultItem {
|
|
1523
|
+
/**
|
|
1524
|
+
* The ID of the chunk. Example: 123e4567-e89b-12d3-a456-426614174000
|
|
1525
|
+
* @public
|
|
1526
|
+
*/
|
|
1527
|
+
chunkId: string;
|
|
1528
|
+
/**
|
|
1529
|
+
* Unique identifier of the document
|
|
1530
|
+
* @public
|
|
1531
|
+
*/
|
|
1532
|
+
documentId: string;
|
|
1533
|
+
documentTitle: string;
|
|
1534
|
+
documentUrl: string;
|
|
1535
|
+
/**
|
|
1536
|
+
* Unique identifier of the data source
|
|
1537
|
+
* @public
|
|
1538
|
+
*/
|
|
1539
|
+
dataSourceId: string;
|
|
1540
|
+
dataSourceType: DataSourceType;
|
|
1541
|
+
/**
|
|
1542
|
+
* The total score of the result, calculated from the semantic search score and the full-text search score.
|
|
1543
|
+
* @public
|
|
1544
|
+
*/
|
|
1545
|
+
score: number;
|
|
1546
|
+
/**
|
|
1547
|
+
* The score of the result, calculated from the full-text bm25 search score.
|
|
1548
|
+
* @public
|
|
1549
|
+
*/
|
|
1550
|
+
fullTextScore?: number | undefined;
|
|
1551
|
+
/**
|
|
1552
|
+
* The score of the result, calculated from the semantic vector search score.
|
|
1553
|
+
* @public
|
|
1554
|
+
*/
|
|
1555
|
+
semanticScore?: number | undefined;
|
|
1556
|
+
/**
|
|
1557
|
+
* The hierarchy of the document. The hierarchy is a list of document IDs that are the parents of the current document. The hierarchy is used to build the document hierarchy in the search results.
|
|
1558
|
+
* @public
|
|
1559
|
+
*/
|
|
1560
|
+
documentHierarchy?: (string)[] | undefined;
|
|
1561
|
+
}
|
|
1562
|
+
/**
|
|
1563
|
+
* @public
|
|
1564
|
+
*/
|
|
1565
|
+
export interface SearchEnrichDataStage {
|
|
1523
1566
|
startTime: number;
|
|
1524
1567
|
endTime: number;
|
|
1525
1568
|
duration: number;
|
|
@@ -1531,19 +1574,47 @@ export interface SearchHistoryEmbeddingStage {
|
|
|
1531
1574
|
startTime: number;
|
|
1532
1575
|
endTime: number;
|
|
1533
1576
|
duration: number;
|
|
1534
|
-
provider: string;
|
|
1535
1577
|
model: string;
|
|
1536
1578
|
inputTokens: number;
|
|
1537
1579
|
outputTokens: number;
|
|
1538
1580
|
}
|
|
1581
|
+
/**
|
|
1582
|
+
* @public
|
|
1583
|
+
*/
|
|
1584
|
+
export interface SearchHistoryOverallStage {
|
|
1585
|
+
startTime: number;
|
|
1586
|
+
endTime: number;
|
|
1587
|
+
duration: number;
|
|
1588
|
+
}
|
|
1589
|
+
/**
|
|
1590
|
+
* @public
|
|
1591
|
+
*/
|
|
1592
|
+
export interface SearchHistorySearchStage {
|
|
1593
|
+
startTime: number;
|
|
1594
|
+
endTime: number;
|
|
1595
|
+
duration: number;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* @public
|
|
1599
|
+
*/
|
|
1600
|
+
export interface SearchHistoryTransformQueryStage {
|
|
1601
|
+
startTime: number;
|
|
1602
|
+
endTime: number;
|
|
1603
|
+
duration: number;
|
|
1604
|
+
model: string;
|
|
1605
|
+
inputTokens: number;
|
|
1606
|
+
outputTokens: number;
|
|
1607
|
+
transformedQuery: string;
|
|
1608
|
+
}
|
|
1539
1609
|
/**
|
|
1540
1610
|
* @public
|
|
1541
1611
|
*/
|
|
1542
1612
|
export interface SearchHistoryStages {
|
|
1543
|
-
overall:
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1613
|
+
overall: SearchHistoryOverallStage;
|
|
1614
|
+
transformQuery?: SearchHistoryTransformQueryStage | undefined;
|
|
1615
|
+
generateQueryEmbedding: SearchHistoryEmbeddingStage;
|
|
1616
|
+
search: SearchHistorySearchStage;
|
|
1617
|
+
enrichData?: SearchEnrichDataStage | undefined;
|
|
1547
1618
|
}
|
|
1548
1619
|
/**
|
|
1549
1620
|
* @public
|
|
@@ -1553,10 +1624,10 @@ export interface SearchHistoryItem {
|
|
|
1553
1624
|
companyId: string;
|
|
1554
1625
|
request: SearchHistoryRequest;
|
|
1555
1626
|
stages: SearchHistoryStages;
|
|
1556
|
-
results: (
|
|
1557
|
-
createdAt:
|
|
1627
|
+
results: (SearchHistoryResultItem)[];
|
|
1628
|
+
createdAt: string;
|
|
1558
1629
|
totalDuration: number;
|
|
1559
|
-
|
|
1630
|
+
resultsCount: number;
|
|
1560
1631
|
}
|
|
1561
1632
|
/**
|
|
1562
1633
|
* @public
|
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.59",
|
|
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",
|