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时才看到它。这就像一个魅力! –