@xapp/stentor-service-kendra 1.73.11 → 1.73.14
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/lib/KendraService.d.ts +3 -4
- package/lib/KendraService.js +73 -53
- package/lib/KendraService.js.map +1 -1
- package/package.json +5 -4
package/lib/KendraService.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*! Copyright (c) 2021, XAPPmedia */
|
|
2
2
|
import { KnowledgeBaseResult, KnowledgeBaseService } from "stentor-models";
|
|
3
|
-
import {
|
|
4
|
-
import { AttributeFilter } from "aws-sdk/clients/kendra";
|
|
3
|
+
import { KendraClient, AttributeFilter, QueryResult } from "@aws-sdk/client-kendra";
|
|
5
4
|
import { KendraServiceConfig } from "./model";
|
|
6
5
|
export declare class KendraService implements KnowledgeBaseService {
|
|
7
6
|
config: KendraServiceConfig;
|
|
8
7
|
private readonly credsReceiver;
|
|
9
|
-
readonly kendraRuntime: Promise<
|
|
8
|
+
readonly kendraRuntime: Promise<KendraClient>;
|
|
10
9
|
constructor(props?: KendraServiceConfig);
|
|
11
10
|
/**
|
|
12
11
|
* Query an input text
|
|
@@ -20,7 +19,7 @@ export declare class KendraService implements KnowledgeBaseService {
|
|
|
20
19
|
*
|
|
21
20
|
* @param kendraResult
|
|
22
21
|
*/
|
|
23
|
-
static convertResult(kendraResult:
|
|
22
|
+
static convertResult(kendraResult: QueryResult): KnowledgeBaseResult;
|
|
24
23
|
/**
|
|
25
24
|
* Create an attr filter to act as a "multi-tenant" filter. Allow any combinations.
|
|
26
25
|
*
|
package/lib/KendraService.js
CHANGED
|
@@ -10,13 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.KendraService = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const client_kendra_1 = require("@aws-sdk/client-kendra");
|
|
14
|
+
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
15
15
|
const stentor_service_lex_1 = require("@xapp/stentor-service-lex");
|
|
16
16
|
const merge = require("lodash.merge");
|
|
17
17
|
class KendraService {
|
|
18
18
|
constructor(props) {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
20
20
|
this.config = {};
|
|
21
21
|
if (props) {
|
|
22
22
|
this.config = merge(this.config, props);
|
|
@@ -32,17 +32,20 @@ class KendraService {
|
|
|
32
32
|
externalId: (_h = (_g = this.config.credentials) === null || _g === void 0 ? void 0 : _g.role) === null || _h === void 0 ? void 0 : _h.externalId,
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
|
-
// Use profile?
|
|
36
|
-
if (!((_k = (_j = this.config) === null || _j === void 0 ? void 0 : _j.credentials) === null || _k === void 0 ? void 0 : _k.accessKeyId) && process.env.AWS_PROFILE) {
|
|
37
|
-
const credentials = new aws_sdk_1.SharedIniFileCredentials({ profile: process.env.AWS_PROFILE });
|
|
38
|
-
this.config.credentials = merge(this.config.credentials || {}, credentials);
|
|
39
|
-
}
|
|
40
35
|
this.kendraRuntime = this.credsReceiver.getCredentials().then((credentials) => {
|
|
41
36
|
var _a;
|
|
42
|
-
|
|
37
|
+
const clientConfig = {
|
|
43
38
|
region: (_a = this.config.credentials) === null || _a === void 0 ? void 0 : _a.region,
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
};
|
|
40
|
+
// Use profile if no credentials retrieved
|
|
41
|
+
if (!credentials && process.env.AWS_PROFILE) {
|
|
42
|
+
clientConfig.credentials = (0, credential_providers_1.fromIni)({ profile: process.env.AWS_PROFILE });
|
|
43
|
+
}
|
|
44
|
+
else if (credentials) {
|
|
45
|
+
// Only pass credentials if defined to allow SDK v3 default credential chain
|
|
46
|
+
clientConfig.credentials = credentials;
|
|
47
|
+
}
|
|
48
|
+
return new client_kendra_1.KendraClient(clientConfig);
|
|
46
49
|
});
|
|
47
50
|
}
|
|
48
51
|
/**
|
|
@@ -53,37 +56,48 @@ class KendraService {
|
|
|
53
56
|
*/
|
|
54
57
|
query(query, props) {
|
|
55
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (!indexId && indexName) {
|
|
64
|
-
const indicesResponse = yield kendra.listIndices().promise();
|
|
65
|
-
if (!indicesResponse) {
|
|
66
|
-
throw new Error("Failed to lookup Kendra indices");
|
|
59
|
+
try {
|
|
60
|
+
const kendra = yield this.kendraRuntime;
|
|
61
|
+
const queryConfig = merge(this.config, props || {});
|
|
62
|
+
const { indexName, resultType, appId, orgId } = queryConfig;
|
|
63
|
+
let indexId = queryConfig.indexId;
|
|
64
|
+
if (!indexId && !indexName) {
|
|
65
|
+
throw new Error("No index name or id was specified");
|
|
67
66
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
if (!indexId && indexName) {
|
|
68
|
+
const indicesResponse = yield kendra.send(new client_kendra_1.ListIndicesCommand({}));
|
|
69
|
+
if (!indicesResponse) {
|
|
70
|
+
throw new Error("Failed to lookup Kendra indices");
|
|
71
|
+
}
|
|
72
|
+
if (!indicesResponse.IndexConfigurationSummaryItems) {
|
|
73
|
+
throw new Error("No index configuration items returned from Kendra");
|
|
74
|
+
}
|
|
75
|
+
const index = indicesResponse.IndexConfigurationSummaryItems.find((item) => {
|
|
76
|
+
return item.Name === indexName;
|
|
77
|
+
});
|
|
78
|
+
if (!index) {
|
|
79
|
+
throw new Error(`Failed to lookup Kendra index: ${indexName}`);
|
|
80
|
+
}
|
|
81
|
+
indexId = index.Id;
|
|
82
|
+
}
|
|
83
|
+
const kendraRequest = {
|
|
84
|
+
IndexId: indexId,
|
|
85
|
+
QueryText: query,
|
|
86
|
+
QueryResultTypeFilter: resultType,
|
|
87
|
+
AttributeFilter: KendraService.createFilter({ appId, orgId })
|
|
88
|
+
};
|
|
89
|
+
const kendraResult = yield kendra.send(new client_kendra_1.QueryCommand(kendraRequest));
|
|
90
|
+
if (!kendraResult) {
|
|
91
|
+
throw new Error(`Failed to get Kendra results for query: ${query}`);
|
|
73
92
|
}
|
|
74
|
-
|
|
93
|
+
return KendraService.convertResult(kendraResult);
|
|
75
94
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
};
|
|
82
|
-
const kendraResult = yield kendra.query(kendraRequest).promise();
|
|
83
|
-
if (!kendraResult) {
|
|
84
|
-
throw new Error(`Failed to get Kendra results for query: ${query}`);
|
|
95
|
+
catch (error) {
|
|
96
|
+
if (error instanceof client_kendra_1.KendraServiceException) {
|
|
97
|
+
throw new Error(`Kendra service error: ${error.message}`);
|
|
98
|
+
}
|
|
99
|
+
throw error;
|
|
85
100
|
}
|
|
86
|
-
return KendraService.convertResult(kendraResult);
|
|
87
101
|
});
|
|
88
102
|
}
|
|
89
103
|
/**
|
|
@@ -93,29 +107,34 @@ class KendraService {
|
|
|
93
107
|
*/
|
|
94
108
|
static convertResult(kendraResult) {
|
|
95
109
|
const kbResult = { suggested: [], faqs: [], documents: [] };
|
|
110
|
+
if (!kendraResult.ResultItems) {
|
|
111
|
+
return kbResult;
|
|
112
|
+
}
|
|
96
113
|
kendraResult.ResultItems.forEach((result) => {
|
|
114
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
97
115
|
if (result.Type === "ANSWER") {
|
|
98
116
|
let topAnswer;
|
|
99
117
|
let document;
|
|
100
118
|
const highlights = [];
|
|
101
|
-
result.AdditionalAttributes.forEach((attribute) => {
|
|
119
|
+
(_a = result.AdditionalAttributes) === null || _a === void 0 ? void 0 : _a.forEach((attribute) => {
|
|
120
|
+
var _a, _b, _c, _d;
|
|
102
121
|
if (attribute.Key === "AnswerText") {
|
|
103
|
-
document = attribute.Value.TextWithHighlightsValue.Text;
|
|
104
|
-
const kendraHighlights = attribute.Value.TextWithHighlightsValue.Highlights;
|
|
105
|
-
kendraHighlights.forEach((kendraHighlight) => {
|
|
122
|
+
document = (_b = (_a = attribute.Value) === null || _a === void 0 ? void 0 : _a.TextWithHighlightsValue) === null || _b === void 0 ? void 0 : _b.Text;
|
|
123
|
+
const kendraHighlights = (_d = (_c = attribute.Value) === null || _c === void 0 ? void 0 : _c.TextWithHighlightsValue) === null || _d === void 0 ? void 0 : _d.Highlights;
|
|
124
|
+
kendraHighlights === null || kendraHighlights === void 0 ? void 0 : kendraHighlights.forEach((kendraHighlight) => {
|
|
106
125
|
highlights.push({
|
|
107
126
|
beginOffset: kendraHighlight.BeginOffset,
|
|
108
127
|
topAnswer: kendraHighlight.TopAnswer,
|
|
109
128
|
endOffset: kendraHighlight.EndOffset
|
|
110
129
|
});
|
|
111
130
|
if (kendraHighlight.TopAnswer) {
|
|
112
|
-
topAnswer = document.substring(kendraHighlight.BeginOffset, kendraHighlight.EndOffset);
|
|
131
|
+
topAnswer = document === null || document === void 0 ? void 0 : document.substring(kendraHighlight.BeginOffset, kendraHighlight.EndOffset);
|
|
113
132
|
}
|
|
114
133
|
});
|
|
115
134
|
}
|
|
116
135
|
});
|
|
117
136
|
kbResult.suggested.push({
|
|
118
|
-
title: result.DocumentTitle.Text,
|
|
137
|
+
title: (_b = result.DocumentTitle) === null || _b === void 0 ? void 0 : _b.Text,
|
|
119
138
|
uri: result.DocumentURI,
|
|
120
139
|
document,
|
|
121
140
|
topAnswer,
|
|
@@ -126,16 +145,17 @@ class KendraService {
|
|
|
126
145
|
let question;
|
|
127
146
|
let document;
|
|
128
147
|
const highlights = [];
|
|
129
|
-
result.AdditionalAttributes.forEach((attribute) => {
|
|
148
|
+
(_c = result.AdditionalAttributes) === null || _c === void 0 ? void 0 : _c.forEach((attribute) => {
|
|
149
|
+
var _a, _b, _c, _d;
|
|
130
150
|
if (attribute.Key === "AnswerText") {
|
|
131
|
-
document = attribute.Value.TextWithHighlightsValue.Text;
|
|
151
|
+
document = (_b = (_a = attribute.Value) === null || _a === void 0 ? void 0 : _a.TextWithHighlightsValue) === null || _b === void 0 ? void 0 : _b.Text;
|
|
132
152
|
}
|
|
133
153
|
else if (attribute.Key === "QuestionText") {
|
|
134
|
-
question = attribute.Value.TextWithHighlightsValue.Text;
|
|
154
|
+
question = (_d = (_c = attribute.Value) === null || _c === void 0 ? void 0 : _c.TextWithHighlightsValue) === null || _d === void 0 ? void 0 : _d.Text;
|
|
135
155
|
}
|
|
136
156
|
});
|
|
137
|
-
const kendraHighlights = result.DocumentExcerpt.Highlights;
|
|
138
|
-
kendraHighlights.forEach((kendraHighlight) => {
|
|
157
|
+
const kendraHighlights = (_d = result.DocumentExcerpt) === null || _d === void 0 ? void 0 : _d.Highlights;
|
|
158
|
+
kendraHighlights === null || kendraHighlights === void 0 ? void 0 : kendraHighlights.forEach((kendraHighlight) => {
|
|
139
159
|
highlights.push({
|
|
140
160
|
beginOffset: kendraHighlight.BeginOffset,
|
|
141
161
|
topAnswer: kendraHighlight.TopAnswer,
|
|
@@ -151,8 +171,8 @@ class KendraService {
|
|
|
151
171
|
}
|
|
152
172
|
else if (result.Type === "DOCUMENT") {
|
|
153
173
|
const highlights = [];
|
|
154
|
-
const kendraHighlights = result.DocumentExcerpt.Highlights;
|
|
155
|
-
kendraHighlights.forEach((kendraHighlight) => {
|
|
174
|
+
const kendraHighlights = (_e = result.DocumentExcerpt) === null || _e === void 0 ? void 0 : _e.Highlights;
|
|
175
|
+
kendraHighlights === null || kendraHighlights === void 0 ? void 0 : kendraHighlights.forEach((kendraHighlight) => {
|
|
156
176
|
highlights.push({
|
|
157
177
|
beginOffset: kendraHighlight.BeginOffset,
|
|
158
178
|
topAnswer: kendraHighlight.TopAnswer,
|
|
@@ -160,9 +180,9 @@ class KendraService {
|
|
|
160
180
|
});
|
|
161
181
|
});
|
|
162
182
|
kbResult.documents.push({
|
|
163
|
-
title: result.DocumentTitle.Text,
|
|
183
|
+
title: (_f = result.DocumentTitle) === null || _f === void 0 ? void 0 : _f.Text,
|
|
164
184
|
uri: result.DocumentURI,
|
|
165
|
-
document: result.DocumentExcerpt.Text,
|
|
185
|
+
document: (_g = result.DocumentExcerpt) === null || _g === void 0 ? void 0 : _g.Text,
|
|
166
186
|
highlights
|
|
167
187
|
});
|
|
168
188
|
}
|
package/lib/KendraService.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KendraService.js","sourceRoot":"","sources":["../src/KendraService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"KendraService.js","sourceRoot":"","sources":["../src/KendraService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,0DASgC;AAChC,wEAAwD;AAExD,mEAAoE;AAGpE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAEtC,MAAa,aAAa;IAOtB,YAAY,KAA2B;;QANvC,WAAM,GAAwB,EAAG,CAAC;QAO9B,IAAI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC,aAAa,GAAG,IAAI,6CAAuB,CAAC;YAC7C,GAAG,EAAE;gBACD,WAAW,EAAE,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,0CAAE,WAAW;gBAClD,eAAe,EAAE,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,0CAAE,eAAe;aAC7D;YACD,IAAI,EAAE;gBACF,GAAG,EAAE,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,WAAW,0CAAE,IAAI,0CAAE,GAAG;gBACvC,WAAW,EAAE,wBAAwB;gBACrC,UAAU,EAAE,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,WAAW,0CAAE,IAAI,0CAAE,UAAU;aACxD;S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,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE;aAC5D,CAAC,CAAC;QACP,CAAC;QAED,IAAI,KAAK,EAAE,CAAC;YACR,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC;gBACtB,QAAQ,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE;aAC5D,CAAC,CAAC;QACP,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAtOD,sCAsOC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.73.
|
|
7
|
+
"version": "1.73.14",
|
|
8
8
|
"description": "Amazon Kendra Knowledge Base Service",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"@types/chai": "5.2.3",
|
|
19
19
|
"@types/dialogflow": "1.0.0",
|
|
20
20
|
"@xapp/config": "0.2.3",
|
|
21
|
-
"aws-sdk": "2.1692.0",
|
|
22
21
|
"chai": "4.5.0",
|
|
23
22
|
"mocha": "11.7.5",
|
|
24
23
|
"stentor-constants": "1.66.50",
|
|
@@ -28,8 +27,10 @@
|
|
|
28
27
|
"typescript": "5.9.3"
|
|
29
28
|
},
|
|
30
29
|
"dependencies": {
|
|
30
|
+
"@aws-sdk/client-kendra": "3.952.0",
|
|
31
|
+
"@aws-sdk/credential-providers": "3.952.0",
|
|
31
32
|
"@xapp/stentor-service": "1.73.11",
|
|
32
|
-
"@xapp/stentor-service-lex": "1.73.
|
|
33
|
+
"@xapp/stentor-service-lex": "1.73.14"
|
|
33
34
|
},
|
|
34
35
|
"peerDependencies": {
|
|
35
36
|
"stentor-constants": "1.x",
|
|
@@ -41,5 +42,5 @@
|
|
|
41
42
|
"clean": "rm -rf ./lib/*",
|
|
42
43
|
"test": "exit 0"
|
|
43
44
|
},
|
|
44
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "017286ddf0063cba947c1651c51a884c1d35efe3"
|
|
45
46
|
}
|