stentor-models 1.48.46 → 1.50.0
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
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { InputUnknownRequestType, IntentRequestType, KnowledgeAnswer, RequestSlotMap } from "../Request";
|
|
3
|
+
import { ActiveContext } from "../Response";
|
|
3
4
|
export interface NLUQueryResponse {
|
|
4
5
|
type: IntentRequestType | InputUnknownRequestType;
|
|
5
6
|
intentId: string;
|
|
6
7
|
slots?: RequestSlotMap;
|
|
7
8
|
knowledgeAnswer?: KnowledgeAnswer;
|
|
8
9
|
}
|
|
10
|
+
export interface NLURequestProps {
|
|
11
|
+
userId?: string;
|
|
12
|
+
sessionId?: string;
|
|
13
|
+
activeContext?: ActiveContext[];
|
|
14
|
+
requestAttributes?: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
9
18
|
/**
|
|
10
19
|
* Service which can turn raw text into an intent and slots (optional).
|
|
11
20
|
*/
|
|
12
21
|
export interface NLUService {
|
|
13
|
-
query(q: string): Promise<NLUQueryResponse>;
|
|
22
|
+
query(q: string, props?: NLURequestProps): Promise<NLUQueryResponse>;
|
|
23
|
+
setContext(props?: NLURequestProps): Promise<void>;
|
|
14
24
|
}
|
|
@@ -109,6 +109,13 @@ export declare abstract class AbstractResponseBuilder<R = any> {
|
|
|
109
109
|
* @returns The builder instance
|
|
110
110
|
*/
|
|
111
111
|
abstract withCarousel(items: ListItem[]): AbstractResponseBuilder<R>;
|
|
112
|
+
/**
|
|
113
|
+
* Add a custom display object to the response
|
|
114
|
+
*
|
|
115
|
+
* @param display - A custom display object
|
|
116
|
+
* @returns The builder instance
|
|
117
|
+
*/
|
|
118
|
+
abstract withDisplay(display: object): AbstractResponseBuilder<R>;
|
|
112
119
|
/**
|
|
113
120
|
* Provide suggestions for the user.
|
|
114
121
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractResponseBuilder.js","sourceRoot":"","sources":["../../src/Response/AbstractResponseBuilder.ts"],"names":[],"mappings":";;;AA+BA,MAAsB,uBAAuB;IAsCzC,YAAmB,KAA2B;QAC1C,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACxB,CAAC;IAtBD;;;;OAIG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;
|
|
1
|
+
{"version":3,"file":"AbstractResponseBuilder.js","sourceRoot":"","sources":["../../src/Response/AbstractResponseBuilder.ts"],"names":[],"mappings":";;;AA+BA,MAAsB,uBAAuB;IAsCzC,YAAmB,KAA2B;QAC1C,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACxB,CAAC;IAtBD;;;;OAIG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAoID;;OAEG;IACI,cAAc;QACjB,OAAO,CAAC,CAAC;IACb,CAAC;CA8DJ;AAlOD,0DAkOC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.50.0",
|
|
8
8
|
"description": "Models for 📣 stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"typings": "lib/index",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@microsoft/api-extractor": "7.19.2",
|
|
21
21
|
"@rollup/plugin-typescript": "8.3.0",
|
|
22
22
|
"@xapp/config": "0.2.3",
|
|
23
|
-
"rollup": "2.
|
|
23
|
+
"rollup": "2.62.0",
|
|
24
24
|
"tslib": "2.3.1",
|
|
25
25
|
"typescript": "4.5.4"
|
|
26
26
|
},
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@xapp/patterns": "1.39.30"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "fc680cb3821ca5f75ffcd8f6da1b42d56254eb52"
|
|
37
37
|
}
|