@xapp/stentor-service-kendra 1.73.11 → 1.73.12
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 +72 -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,15 +32,17 @@ 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
|
-
var _a;
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
var _a, _b;
|
|
37
|
+
// Use profile if no credentials retrieved
|
|
38
|
+
if (!credentials && process.env.AWS_PROFILE) {
|
|
39
|
+
return new client_kendra_1.KendraClient({
|
|
40
|
+
region: (_a = this.config.credentials) === null || _a === void 0 ? void 0 : _a.region,
|
|
41
|
+
credentials: (0, credential_providers_1.fromIni)({ profile: process.env.AWS_PROFILE })
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return new client_kendra_1.KendraClient({
|
|
45
|
+
region: (_b = this.config.credentials) === null || _b === void 0 ? void 0 : _b.region,
|
|
44
46
|
credentials
|
|
45
47
|
});
|
|
46
48
|
});
|
|
@@ -53,37 +55,48 @@ class KendraService {
|
|
|
53
55
|
*/
|
|
54
56
|
query(query, props) {
|
|
55
57
|
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");
|
|
58
|
+
try {
|
|
59
|
+
const kendra = yield this.kendraRuntime;
|
|
60
|
+
const queryConfig = merge(this.config, props || {});
|
|
61
|
+
const { indexName, resultType, appId, orgId } = queryConfig;
|
|
62
|
+
let indexId = queryConfig.indexId;
|
|
63
|
+
if (!indexId && !indexName) {
|
|
64
|
+
throw new Error("No index name or id was specified");
|
|
67
65
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
if (!indexId && indexName) {
|
|
67
|
+
const indicesResponse = yield kendra.send(new client_kendra_1.ListIndicesCommand({}));
|
|
68
|
+
if (!indicesResponse) {
|
|
69
|
+
throw new Error("Failed to lookup Kendra indices");
|
|
70
|
+
}
|
|
71
|
+
if (!indicesResponse.IndexConfigurationSummaryItems) {
|
|
72
|
+
throw new Error("No index configuration items returned from Kendra");
|
|
73
|
+
}
|
|
74
|
+
const index = indicesResponse.IndexConfigurationSummaryItems.find((item) => {
|
|
75
|
+
return item.Name === indexName;
|
|
76
|
+
});
|
|
77
|
+
if (!index) {
|
|
78
|
+
throw new Error(`Failed to lookup Kendra index: ${indexName}`);
|
|
79
|
+
}
|
|
80
|
+
indexId = index.Id;
|
|
73
81
|
}
|
|
74
|
-
|
|
82
|
+
const kendraRequest = {
|
|
83
|
+
IndexId: indexId,
|
|
84
|
+
QueryText: query,
|
|
85
|
+
QueryResultTypeFilter: resultType,
|
|
86
|
+
AttributeFilter: KendraService.createFilter({ appId, orgId })
|
|
87
|
+
};
|
|
88
|
+
const kendraResult = yield kendra.send(new client_kendra_1.QueryCommand(kendraRequest));
|
|
89
|
+
if (!kendraResult) {
|
|
90
|
+
throw new Error(`Failed to get Kendra results for query: ${query}`);
|
|
91
|
+
}
|
|
92
|
+
return KendraService.convertResult(kendraResult);
|
|
75
93
|
}
|
|
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}`);
|
|
94
|
+
catch (error) {
|
|
95
|
+
if (error instanceof client_kendra_1.KendraServiceException) {
|
|
96
|
+
throw new Error(`Kendra service error: ${error.message}`);
|
|
97
|
+
}
|
|
98
|
+
throw error;
|
|
85
99
|
}
|
|
86
|
-
return KendraService.convertResult(kendraResult);
|
|
87
100
|
});
|
|
88
101
|
}
|
|
89
102
|
/**
|
|
@@ -93,29 +106,34 @@ class KendraService {
|
|
|
93
106
|
*/
|
|
94
107
|
static convertResult(kendraResult) {
|
|
95
108
|
const kbResult = { suggested: [], faqs: [], documents: [] };
|
|
109
|
+
if (!kendraResult.ResultItems) {
|
|
110
|
+
return kbResult;
|
|
111
|
+
}
|
|
96
112
|
kendraResult.ResultItems.forEach((result) => {
|
|
113
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
97
114
|
if (result.Type === "ANSWER") {
|
|
98
115
|
let topAnswer;
|
|
99
116
|
let document;
|
|
100
117
|
const highlights = [];
|
|
101
|
-
result.AdditionalAttributes.forEach((attribute) => {
|
|
118
|
+
(_a = result.AdditionalAttributes) === null || _a === void 0 ? void 0 : _a.forEach((attribute) => {
|
|
119
|
+
var _a, _b, _c, _d;
|
|
102
120
|
if (attribute.Key === "AnswerText") {
|
|
103
|
-
document = attribute.Value.TextWithHighlightsValue.Text;
|
|
104
|
-
const kendraHighlights = attribute.Value.TextWithHighlightsValue.Highlights;
|
|
105
|
-
kendraHighlights.forEach((kendraHighlight) => {
|
|
121
|
+
document = (_b = (_a = attribute.Value) === null || _a === void 0 ? void 0 : _a.TextWithHighlightsValue) === null || _b === void 0 ? void 0 : _b.Text;
|
|
122
|
+
const kendraHighlights = (_d = (_c = attribute.Value) === null || _c === void 0 ? void 0 : _c.TextWithHighlightsValue) === null || _d === void 0 ? void 0 : _d.Highlights;
|
|
123
|
+
kendraHighlights === null || kendraHighlights === void 0 ? void 0 : kendraHighlights.forEach((kendraHighlight) => {
|
|
106
124
|
highlights.push({
|
|
107
125
|
beginOffset: kendraHighlight.BeginOffset,
|
|
108
126
|
topAnswer: kendraHighlight.TopAnswer,
|
|
109
127
|
endOffset: kendraHighlight.EndOffset
|
|
110
128
|
});
|
|
111
129
|
if (kendraHighlight.TopAnswer) {
|
|
112
|
-
topAnswer = document.substring(kendraHighlight.BeginOffset, kendraHighlight.EndOffset);
|
|
130
|
+
topAnswer = document === null || document === void 0 ? void 0 : document.substring(kendraHighlight.BeginOffset, kendraHighlight.EndOffset);
|
|
113
131
|
}
|
|
114
132
|
});
|
|
115
133
|
}
|
|
116
134
|
});
|
|
117
135
|
kbResult.suggested.push({
|
|
118
|
-
title: result.DocumentTitle.Text,
|
|
136
|
+
title: (_b = result.DocumentTitle) === null || _b === void 0 ? void 0 : _b.Text,
|
|
119
137
|
uri: result.DocumentURI,
|
|
120
138
|
document,
|
|
121
139
|
topAnswer,
|
|
@@ -126,16 +144,17 @@ class KendraService {
|
|
|
126
144
|
let question;
|
|
127
145
|
let document;
|
|
128
146
|
const highlights = [];
|
|
129
|
-
result.AdditionalAttributes.forEach((attribute) => {
|
|
147
|
+
(_c = result.AdditionalAttributes) === null || _c === void 0 ? void 0 : _c.forEach((attribute) => {
|
|
148
|
+
var _a, _b, _c, _d;
|
|
130
149
|
if (attribute.Key === "AnswerText") {
|
|
131
|
-
document = attribute.Value.TextWithHighlightsValue.Text;
|
|
150
|
+
document = (_b = (_a = attribute.Value) === null || _a === void 0 ? void 0 : _a.TextWithHighlightsValue) === null || _b === void 0 ? void 0 : _b.Text;
|
|
132
151
|
}
|
|
133
152
|
else if (attribute.Key === "QuestionText") {
|
|
134
|
-
question = attribute.Value.TextWithHighlightsValue.Text;
|
|
153
|
+
question = (_d = (_c = attribute.Value) === null || _c === void 0 ? void 0 : _c.TextWithHighlightsValue) === null || _d === void 0 ? void 0 : _d.Text;
|
|
135
154
|
}
|
|
136
155
|
});
|
|
137
|
-
const kendraHighlights = result.DocumentExcerpt.Highlights;
|
|
138
|
-
kendraHighlights.forEach((kendraHighlight) => {
|
|
156
|
+
const kendraHighlights = (_d = result.DocumentExcerpt) === null || _d === void 0 ? void 0 : _d.Highlights;
|
|
157
|
+
kendraHighlights === null || kendraHighlights === void 0 ? void 0 : kendraHighlights.forEach((kendraHighlight) => {
|
|
139
158
|
highlights.push({
|
|
140
159
|
beginOffset: kendraHighlight.BeginOffset,
|
|
141
160
|
topAnswer: kendraHighlight.TopAnswer,
|
|
@@ -151,8 +170,8 @@ class KendraService {
|
|
|
151
170
|
}
|
|
152
171
|
else if (result.Type === "DOCUMENT") {
|
|
153
172
|
const highlights = [];
|
|
154
|
-
const kendraHighlights = result.DocumentExcerpt.Highlights;
|
|
155
|
-
kendraHighlights.forEach((kendraHighlight) => {
|
|
173
|
+
const kendraHighlights = (_e = result.DocumentExcerpt) === null || _e === void 0 ? void 0 : _e.Highlights;
|
|
174
|
+
kendraHighlights === null || kendraHighlights === void 0 ? void 0 : kendraHighlights.forEach((kendraHighlight) => {
|
|
156
175
|
highlights.push({
|
|
157
176
|
beginOffset: kendraHighlight.BeginOffset,
|
|
158
177
|
topAnswer: kendraHighlight.TopAnswer,
|
|
@@ -160,9 +179,9 @@ class KendraService {
|
|
|
160
179
|
});
|
|
161
180
|
});
|
|
162
181
|
kbResult.documents.push({
|
|
163
|
-
title: result.DocumentTitle.Text,
|
|
182
|
+
title: (_f = result.DocumentTitle) === null || _f === void 0 ? void 0 : _f.Text,
|
|
164
183
|
uri: result.DocumentURI,
|
|
165
|
-
document: result.DocumentExcerpt.Text,
|
|
184
|
+
document: (_g = result.DocumentExcerpt) === null || _g === void 0 ? void 0 : _g.Text,
|
|
166
185
|
highlights
|
|
167
186
|
});
|
|
168
187
|
}
|
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;SACJ,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,GAAG,I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AAE;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;AApOD,sCAoOC"}
|
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.12",
|
|
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.12"
|
|
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": "f73976e112745a0bcb6fd26576951405870de622"
|
|
45
46
|
}
|