@xapp/stentor-service-kendra 1.86.9 → 1.86.10
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/README.md +24 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
## @xapp/stentor-service-kendra
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Implementation of Stentor's `KnowledgeBaseService` backed by Amazon Kendra. `KendraService#query` looks up (or accepts) a Kendra index, runs a `QueryCommand` against it, optionally filters results by `appId`/`orgId` for multi-tenant indices, and converts the Kendra response (answers, FAQs, and documents with highlights) into Stentor's `KnowledgeBaseResult` shape.
|
|
4
|
+
|
|
5
|
+
### Required Environment Variables
|
|
6
|
+
|
|
7
|
+
- `AWS_PROFILE` - optional local AWS credentials profile used as a fallback when no explicit `accessKeyId`/`secretAccessKey`/role credentials are supplied to the service config
|
|
8
|
+
|
|
9
|
+
### Usage
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { KendraService } from "@xapp/stentor-service-kendra";
|
|
13
|
+
|
|
14
|
+
const kendra = new KendraService({
|
|
15
|
+
indexName: "my-kendra-index",
|
|
16
|
+
credentials: { region: "us-east-1" }
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const result = await kendra.query("what are your hours?");
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
- [Amazon Kendra Developer Guide](https://docs.aws.amazon.com/kendra/latest/dg/what-is-kendra.html)
|
|
25
|
+
- [AWS SDK for JavaScript v3 - Kendra Client](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/client-kendra/)
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.86.
|
|
7
|
+
"version": "1.86.10",
|
|
8
8
|
"description": "Amazon Kendra Knowledge Base Service",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"typescript": "5.9.3"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aws-sdk/client-kendra": "3.
|
|
31
|
-
"@aws-sdk/credential-providers": "3.
|
|
32
|
-
"@xapp/stentor-service-lex": "1.86.
|
|
30
|
+
"@aws-sdk/client-kendra": "3.1133.0",
|
|
31
|
+
"@aws-sdk/credential-providers": "3.1133.0",
|
|
32
|
+
"@xapp/stentor-service-lex": "1.86.10"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"stentor-constants": "1.x",
|