stentor-models 1.54.12 → 1.54.20
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/NLU/NLUService.d.ts +20 -3
- package/package.json +4 -4
package/lib/NLU/NLUService.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export interface NLUQueryResponse {
|
|
|
15
15
|
* Confidence level of the intent match. On a scale from 0-1 where 1 is the highest confidence of a match.
|
|
16
16
|
*/
|
|
17
17
|
matchConfidence?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Some NLUs will also return knowledgebase results.
|
|
20
|
+
*/
|
|
18
21
|
knowledgeAnswer?: KnowledgeAnswer;
|
|
19
22
|
}
|
|
20
23
|
export interface NLURequestProps {
|
|
@@ -35,14 +38,28 @@ export interface NLURequestProps {
|
|
|
35
38
|
* certain intents.
|
|
36
39
|
*/
|
|
37
40
|
activeContext?: ActiveContext[];
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Optional request attributes.
|
|
43
|
+
*/
|
|
44
|
+
requestAttributes?: Record<string, string>;
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
47
|
* Service which can turn raw text into an intent and slots (optional).
|
|
44
48
|
*/
|
|
45
49
|
export interface NLUService {
|
|
50
|
+
/**
|
|
51
|
+
* Query the NLU with the user's natural language input. A resolved intent will be returned from the NLU
|
|
52
|
+
*
|
|
53
|
+
* @param q Natural language query from the user
|
|
54
|
+
* @param props
|
|
55
|
+
*/
|
|
46
56
|
query(q: string, props?: NLURequestProps): Promise<NLUQueryResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Used to set context that will be used for the next query of the NLU.
|
|
59
|
+
*
|
|
60
|
+
* This is used to set active contexts for example, which help prefer certain intents on the next query call.
|
|
61
|
+
*
|
|
62
|
+
* @param props
|
|
63
|
+
*/
|
|
47
64
|
setContext?(props: NLURequestProps): Promise<void>;
|
|
48
65
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.54.
|
|
7
|
+
"version": "1.54.20",
|
|
8
8
|
"description": "Models for 📣 stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"typings": "lib/index",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"node": "^10 || ^12 || ^14 || ^16.0.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@microsoft/api-extractor": "7.
|
|
20
|
+
"@microsoft/api-extractor": "7.20.0",
|
|
21
21
|
"@rollup/plugin-typescript": "8.3.1",
|
|
22
22
|
"@xapp/config": "0.2.3",
|
|
23
23
|
"rollup": "2.70.1",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"clean": "rm -rf ./lib/* && rm -rf ./dist/*"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@xapp/patterns": "1.40.
|
|
34
|
+
"@xapp/patterns": "1.40.101"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "ca6485e394f184db163d4c082a809eb090c32d68"
|
|
37
37
|
}
|