@wildix/wim-knowledge-base-client 0.0.23 → 0.0.25
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.
|
@@ -385,6 +385,7 @@ const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
385
385
|
let body;
|
|
386
386
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
387
387
|
'searchConfig': _ => se_SearchConfig(_, context),
|
|
388
|
+
'withMetadata': [],
|
|
388
389
|
}));
|
|
389
390
|
b.m("POST")
|
|
390
391
|
.h(headers)
|
|
@@ -802,6 +803,7 @@ const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
|
802
803
|
});
|
|
803
804
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
804
805
|
const doc = (0, smithy_client_1.take)(data, {
|
|
806
|
+
'metadata': _ => de_Document(_, context),
|
|
805
807
|
'results': _ => de_SearchKnowledgeBaseResults(_, context),
|
|
806
808
|
});
|
|
807
809
|
Object.assign(contents, doc);
|
|
@@ -1111,12 +1113,12 @@ const de_ProxyConfig = (output, context) => {
|
|
|
1111
1113
|
const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
1112
1114
|
return (0, smithy_client_1.take)(output, {
|
|
1113
1115
|
'content': smithy_client_1.expectString,
|
|
1116
|
+
'dataSourceId': smithy_client_1.expectString,
|
|
1114
1117
|
'dataSourceType': smithy_client_1.expectString,
|
|
1115
1118
|
'documentId': smithy_client_1.expectString,
|
|
1116
1119
|
'documentTitle': smithy_client_1.expectString,
|
|
1117
1120
|
'documentUrl': smithy_client_1.expectString,
|
|
1118
1121
|
'score': smithy_client_1.limitedParseDouble,
|
|
1119
|
-
'source': smithy_client_1.expectString,
|
|
1120
1122
|
});
|
|
1121
1123
|
};
|
|
1122
1124
|
const de_SearchKnowledgeBaseResults = (output, context) => {
|
|
@@ -361,6 +361,7 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
361
361
|
let body;
|
|
362
362
|
body = JSON.stringify(take(input, {
|
|
363
363
|
'searchConfig': _ => se_SearchConfig(_, context),
|
|
364
|
+
'withMetadata': [],
|
|
364
365
|
}));
|
|
365
366
|
b.m("POST")
|
|
366
367
|
.h(headers)
|
|
@@ -752,6 +753,7 @@ export const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
|
752
753
|
});
|
|
753
754
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
754
755
|
const doc = take(data, {
|
|
756
|
+
'metadata': _ => de_Document(_, context),
|
|
755
757
|
'results': _ => de_SearchKnowledgeBaseResults(_, context),
|
|
756
758
|
});
|
|
757
759
|
Object.assign(contents, doc);
|
|
@@ -1055,12 +1057,12 @@ const de_ProxyConfig = (output, context) => {
|
|
|
1055
1057
|
const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
1056
1058
|
return take(output, {
|
|
1057
1059
|
'content': __expectString,
|
|
1060
|
+
'dataSourceId': __expectString,
|
|
1058
1061
|
'dataSourceType': __expectString,
|
|
1059
1062
|
'documentId': __expectString,
|
|
1060
1063
|
'documentTitle': __expectString,
|
|
1061
1064
|
'documentUrl': __expectString,
|
|
1062
1065
|
'score': __limitedParseDouble,
|
|
1063
|
-
'source': __expectString,
|
|
1064
1066
|
});
|
|
1065
1067
|
};
|
|
1066
1068
|
const de_SearchKnowledgeBaseResults = (output, context) => {
|
|
@@ -43,6 +43,7 @@ declare const SearchKnowledgeBaseCommand_base: {
|
|
|
43
43
|
* threshold: Number("double"),
|
|
44
44
|
* searchStrategy: "bm25" || "vector" || "hybrid",
|
|
45
45
|
* },
|
|
46
|
+
* withMetadata: true || false,
|
|
46
47
|
* };
|
|
47
48
|
* const command = new SearchKnowledgeBaseCommand(input);
|
|
48
49
|
* const response = await client.send(command);
|
|
@@ -51,13 +52,14 @@ declare const SearchKnowledgeBaseCommand_base: {
|
|
|
51
52
|
* // { // SearchKnowledgeBaseResult
|
|
52
53
|
* // documentId: "STRING_VALUE", // required
|
|
53
54
|
* // documentTitle: "STRING_VALUE", // required
|
|
54
|
-
* // score: Number("double"), // required
|
|
55
|
-
* // source: "STRING_VALUE", // required
|
|
56
|
-
* // content: "STRING_VALUE", // required
|
|
57
55
|
* // documentUrl: "STRING_VALUE", // required
|
|
56
|
+
* // dataSourceId: "STRING_VALUE", // required
|
|
58
57
|
* // dataSourceType: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
58
|
+
* // content: "STRING_VALUE", // required
|
|
59
|
+
* // score: Number("double"), // required
|
|
59
60
|
* // },
|
|
60
61
|
* // ],
|
|
62
|
+
* // metadata: "DOCUMENT_VALUE",
|
|
61
63
|
* // };
|
|
62
64
|
*
|
|
63
65
|
* ```
|
|
@@ -1327,6 +1327,11 @@ export interface SearchKnowledgeBaseInput {
|
|
|
1327
1327
|
* @public
|
|
1328
1328
|
*/
|
|
1329
1329
|
searchConfig?: SearchConfig | undefined;
|
|
1330
|
+
/**
|
|
1331
|
+
* Whether to include the metadata of the search results.
|
|
1332
|
+
* @public
|
|
1333
|
+
*/
|
|
1334
|
+
withMetadata?: boolean | undefined;
|
|
1330
1335
|
}
|
|
1331
1336
|
/**
|
|
1332
1337
|
* @public
|
|
@@ -1338,21 +1343,22 @@ export interface SearchKnowledgeBaseResult {
|
|
|
1338
1343
|
*/
|
|
1339
1344
|
documentId: string;
|
|
1340
1345
|
documentTitle: string;
|
|
1341
|
-
|
|
1346
|
+
documentUrl: string;
|
|
1342
1347
|
/**
|
|
1343
1348
|
* The ID of the data source. Example: 123e4567-e89b-12d3-a456-426614174000
|
|
1344
1349
|
* @public
|
|
1345
1350
|
*/
|
|
1346
|
-
|
|
1347
|
-
content: string;
|
|
1348
|
-
documentUrl: string;
|
|
1351
|
+
dataSourceId: string;
|
|
1349
1352
|
dataSourceType: DataSourceType;
|
|
1353
|
+
content: string;
|
|
1354
|
+
score: number;
|
|
1350
1355
|
}
|
|
1351
1356
|
/**
|
|
1352
1357
|
* @public
|
|
1353
1358
|
*/
|
|
1354
1359
|
export interface SearchKnowledgeBaseOutput {
|
|
1355
1360
|
results: (SearchKnowledgeBaseResult)[];
|
|
1361
|
+
metadata?: __DocumentType | undefined;
|
|
1356
1362
|
}
|
|
1357
1363
|
/**
|
|
1358
1364
|
* @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.25",
|
|
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",
|