NlpEngineOptions
type NlpEngineOptions = { locale?: string; logger?: Logger; providers: NlpProviderActions[]; retrainDelay?: number; services: Services; threshold?: number;};Defined in: engine/engine.types.ts:9
Properties
Section titled “Properties”locale?
Section titled “locale?”optional locale?: string;Defined in: engine/engine.types.ts:13
Language the corpus is trained in. Defaults to 'en'.
logger?
Section titled “logger?”optional logger?: Logger;Defined in: engine/engine.types.ts:32
providers
Section titled “providers”providers: NlpProviderActions[];Defined in: engine/engine.types.ts:11
retrainDelay?
Section titled “retrainDelay?”optional retrainDelay?: number;Defined in: engine/engine.types.ts:31
How long to wait after a slot reports a change before retraining, in
milliseconds. Defaults to 250.
Coalescing matters more than latency here: a provider reconnecting can mark a dozen slots stale in the same tick, and each one triggering its own retrain would rebuild the whole corpus a dozen times.
services
Section titled “services”services: Services;Defined in: engine/engine.types.ts:10
threshold?
Section titled “threshold?”optional threshold?: number;Defined in: engine/engine.types.ts:22
Score below which a phrase is treated as matching nothing. Defaults to
0.8, and overridable per call.
This is the engine’s own floor, not a decision about whether to act. A caller about to execute a match rather than display it should apply a higher bar — the cost of a false positive there is a wrong action taken silently.