如何在机器人框架中发送提醒

How to send a reminder in bot framework

我正在使用 Microsoft 的 Bot Framework / Bot Builder for C#.NET / LUIS 构建一个测试机器人。它部署在 Azure 上。我的测试项目的想法是向用户发送提醒。

例如,当用户在 1 小时内开会时,机器人应该回复 "meeting in 1 hour",它应该在一小时内发起对话或发送对现有对话的回复。

我可以使用 LUIS 将自然语言解析为日期和任务,但是我不知道如何安排任务以便框架稍后以某种方式向用户发送回复。

我建议您查看 AlarmBot sample,因为它展示了类似的场景。根据文档:

The alarm bot sample illustrates several concepts:

  • modifying the dialog stack based on external events (e.g. the passage of time)
  • proactively messaging the user based on external events (e.g. the alarm is ringing)

如果您使用的是 Bot Framework v4,请参阅 Get notification from bots