NLUService
Stentor API Reference / stentor-models/src / NLUService
Interface: NLUService
Defined in: packages/stentor-models/src/NLU/NLUService.ts:70
Service which can turn raw text into an intent and slots (optional).
Methodsβ
query()β
query(
q,props?):Promise\<NLUQueryResponse>
Defined in: packages/stentor-models/src/NLU/NLUService.ts:77
Query the NLU with the user's natural language input. A resolved intent will be returned from the NLU
Parametersβ
qβ
string
Natural language query from the user
props?β
Returnsβ
Promise\<NLUQueryResponse>
setContext()?β
optionalsetContext(props):Promise\<void>
Defined in: packages/stentor-models/src/NLU/NLUService.ts:85
Used to set context that will be used for the next query of the NLU.
This is used to set active contexts for example, which help prefer certain intents on the next query call.
Parametersβ
propsβ
Returnsβ
Promise\<void>