1
私はいくつかの物語しか持っていませんが、blah
のようなものを試してみると、hello
物語を使います。wit.aiで「私は控えめな」物語を作る方法
しかし、回答I don't understant
と*wildcard
のようなものが必要です。 witbotとintencesで簡単 、私はノード・ウィットと話に作る方法を知りません。
私はいくつかの物語しか持っていませんが、blah
のようなものを試してみると、hello
物語を使います。wit.aiで「私は控えめな」物語を作る方法
しかし、回答I don't understant
と*wildcard
のようなものが必要です。 witbotとintencesで簡単 、私はノード・ウィットと話に作る方法を知りません。
私は同様の問題がありました。次のステップの信頼度があらかじめ定義されたしきい値より低い場合、特別なlowConfidenceメソッドを呼び出すwit.jsコードを微調整することに決めました。
// Setting up our wit client
const witClient = new Wit({
accessToken: WIT_TOKEN,
actions: witActions,
lowConfidenceThreshold: LOW_CONFIDENCE_THRESHOLD,
logger: new log.Logger(log.DEBUG)
});
以降
lowConfidence({context}) {
console.log("lowConfidenceConversationResponse");
return new Promise(function(resolve) {
context.lowConfidence=true;
context.done=true;
// now create a low_confidence story in wit.ai
// and have the bot response triggered always
// when context.lowConfidence is set
return resolve(context);
});
}
そしてwit.js私が探していたまさに
else if (json.type === 'action') {
let action = json.action;
// json.confidence is confidence of next step and NOT
// wit.ai intent identification confidence
const confidence = json.entities && json.entities.intent &&
Array.isArray(json.entities.intent) &&
json.entities.intent.length > 0 &&
json.entities.intent[0].confidence;
if (confidence && confidence<lowConfidenceThreshold)
action = 'lowConfidence' ;
中:私のウィットアクションはファイルに
。 :) –