本文整理汇总了TypeScript中botbuilder-instrumentation.BotFrameworkInstrumentation类的典型用法代码示例。如果您正苦于以下问题:TypeScript BotFrameworkInstrumentation类的具体用法?TypeScript BotFrameworkInstrumentation怎么用?TypeScript BotFrameworkInstrumentation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BotFrameworkInstrumentation类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: createLocalizedDialog
function createLocalizedDialog(locale: string, instrumentation: BotFrameworkInstrumentation): IntentDialog {
const recognizer = createRecognizer(locale);
instrumentation.monitor(null, recognizer);
return new IntentDialog({ recognizers: [recognizer] })
.onBegin(onBegin)
.matches('confirmation.yes', onYes)
.matches('confirmation.no', onNo)
.matches('command.cancel', onCancel)
.onDefault(onUnknown(instrumentation));
}
示例2: setupInstrumentation
private setupInstrumentation() {
this.use({
botbuilder: logger.onMessageReceived,
send: logger.onMessageSent
});
this.instrumentation = new BotFrameworkInstrumentation({
instrumentationKey: config.get('BotDevAppInsightsKey'),
sentiments: {
key: config.get('CG_SENTIMENT_KEY')
},
autoLogOptions: {
autoCollectExceptions: true
}
});
this.instrumentation.monitor(this);
}
示例3: return
return (session: Session, qnaMakerResult: IQnAMakerResults) => {
instrumentation.trackQNAEvent(session, session.message.text, qnaMakerResult.answers[0].questions[0], qnaMakerResult.answers[0].answer, qnaMakerResult.answers[0].score);
session.send(qnaMakerResult.answers[0].answer);
};
示例4: return
return (session: Session, luisResults: IIntentRecognizerResult) => {
instrumentation.trackCustomEvent('MBFEvent.CustomEvent.Unknown', { text: session.message.text, luisResults: luisResults }, session);
session.send(new Message(session)
.text('confirmation.unknown')
.suggestedActions(getSuggestedActions(session)));
};