@wildix/wim-knowledge-base-client 0.0.53 → 0.0.54
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 +26 -35
- package/dist-es/protocols/Aws_restJson1.js +26 -35
- 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
|
@@ -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
|
}));
|
|
@@ -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
|
};
|
|
@@ -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
|
}));
|
|
@@ -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.54",
|
|
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",
|