質問者
【QnA maker】Botの未登録文言に対するメッセージの返答が変更できない

質問
-
こんにちは。助けてください・・
No QnAMaker answers found.
QnAmakerを使って、Botを作成しています。
Azure上のオンラインエディターを使って、未登録文言の質問が来た時に返答するメッセージを編集したいのですが、ビルドがうまくいかないのか、botに反映されません。
【状況】
未登録の質問をすると
と返答される。
新規接続時に送られる最初のメッセージは変更できています。
【実施・試したこと】
・「qnamakerBaseDialog.js」のファイル内のDefaultNoAnswerの値を「No QnAMaker answers found.」から「ちょっとよくわからないや」に変更
・「deploy.cmd」の実行
・左列にある「Run」を実行
画像の貼り付けができなかったので、いったん投稿します、すみません。
// If a new user is added to the conversation, send them a greeting message
こちら、他にも実行すべきものがあるんでしょうか?
No QnAMaker answers found.を検索してもソース上はヒットしない状態です。。
OKだったもの「qnaBot.js」ファイル内context.sendActivityの「こんにちは」
this.onMembersAdded(async (context, next) => {
const membersAdded = context.activity.membersAdded;
for (let cnt = 0; cnt < membersAdded.length; cnt++) {
if (membersAdded[cnt].id !== context.activity.recipient.id) {
await context.sendActivity('こんにちは!');
}
}
// By calling next() you ensure that the next BotHandler is run.
await next();
});
// Default parameters
反映されないもの「qnamakerBaseDialog.js」ファイル内DefaultNoAnswerの値
const DefaultThreshold = 0.3;
const DefaultTopN = 3;
const DefaultNoAnswer = 'ちょっとよくわからないや。ほかのことばではなしかけてみてね';
\ [master*]> \deploy.cmd
deploy.cmd実行時のコンソール表示
Installing Kudu Sync
D:\local\AppData\npm\kudusync -> D:\local\AppData\npm\node_modules\kudusync\bin\kudusync
+ kudusync@0.3.0
added 7 packages from 8 contributors in 3.8s
Handling node.js deployment.
Kudu sync from: 'D:\home\site\wwwroot\.' to: 'D:\home\site\wwwroot\..\artifacts\wwwroot'
Ignoring: .deployment
Ignoring: deploy.cmd
Copying file: 'package-lock.json'
Ignoring: .git
Copying file: 'bots\qnaBot.js'
audited 667 packages in 46.013s
found 113 vulnerabilities (112 low, 1 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
Finished successfully.
npm WARN ws@7.3.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
「Run」実行時のコンソール表示
[info] Restarting server...
[info] Click on http://poyoncho-go-bot.azurewebsites.net to open your site
(node:6360) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
restify listening to http://undefined:undefined.
Get Bot Framework Emulator: https://aka.ms/botframework-emulator
To talk to your bot, open the emulator select "Open Bot"
助けてください。。
いろいろ調べましたが、能力が足りず、困っています。。お願いします。。- 編集済み ぽよんちょ 2020年7月10日 9:04
すべての返信
-
こんにちは。
qnamakerbaseDialog.jsのQnAMakerBaseDialogクラスの
var noAnswer = ActivityFactory.DefaultNoAnswer;
を
var noAnswer = DefaultNoAnswer;
に変更してください。
- 回答の候補に設定 Haruka6002Microsoft contingent staff, Moderator 2020年7月27日 0:52