1
在LUIS Sdk或Bot Sdk中是否有內置的幫助方法將LUIS DatetimeV2實體轉換爲JS Date對象?我已經看到一些已經使用C#的慢速解析器,但我找不到任何適用於Nodejs的東西。將LUIS Datetime V2轉換爲JS日期
const dt = builder.EntityRecognizer.findEntity(args.intent.entities, 'datetimeV2');
if (dt) {
// this is just the matching intent, I believe.
// example intents; today, yesterday, 2/28, 31/5, ...
// How do I convert this to a valid Date is where I am stuck.
}
感謝。我不知道'IEntity'類型中有'resolution'屬性。只是在對整個dt對象進行stringify時纔看到它。這就像一個魅力! –