UNPKG

@ebonydevcopy/framework

Version:

A module-based NodeJS chatbot framework.

26 lines 822 B
/** * ebony-framework * * @module handlers/nlp * @author Christos Panagiotakopoulos <chrispanag@gmail.com> * @copyright Copyright(c) 2020 Christos Panagiotakopoulos * @license MIT * */ import IntentRouter from '../routers/IntentRouter'; import User from '../models/User'; import { WitNLP } from '../interfaces/nlp'; import { Bot } from '../index'; export interface INLPHandlerOptions { confidenceThreshold?: number; maxMessageLength?: number; } /** * @param intentRouter - An IntentRouter instance * @returns Returns the nlpHandler function */ declare function nlpHandlerFactory<U extends User<any>>(intentRouter: IntentRouter, options?: INLPHandlerOptions): (this: Bot<U>, user: U, message: { text: string; }, nlp: WitNLP) => any; export default nlpHandlerFactory; //# sourceMappingURL=nlp.d.ts.map