首页 > 解决方案 > 删除数据库会话后 Rasa 错误消失 为什么?

问题描述

我在 Rasa 有一个奇怪的问题。当我删除某些动作名称或更改某些动作名称时。同时,我还删除了一些插槽。Rasa 将收到以下错误:

2019-10-12 13:57:58 ERROR    rasa.core.trackers  - Tried to set non existent slot 'mathcalc'. Make sure you added all your slots to your domain file.
2019-10-12 13:57:58 ERROR    rasa.core.trackers  - Tried to set non existent slot 'mathcalc'. Make sure you added all your slots to your domain file.
2019-10-12 13:57:58 ERROR    rasa.core.trackers  - Tried to set non existent slot 'mathcalc'. Make sure you added all your slots to your domain file.
2019-10-12 13:57:58 ERROR    rasa.core.trackers  - Tried to set non existent slot 'mathcalc'. Make sure you added all your slots to your domain file.
2019-10-12 13:57:58 ERROR    rasa.core.trackers  - Tried to set non existent slot 'mathcalc'. Make sure you added all your slots to your domain file.

2019-10-12 13:57:58 WARNING  rasa.core.featurizers  - Feature 'intent_calc_plus' could not be found in feature map.
2019-10-12 13:57:58 WARNING  rasa.core.featurizers  - Feature 'active_form_meeting_form' could not be found in feature map.
2019-10-12 13:57:58 WARNING  rasa.core.featurizers  - Feature 'entity_mathcalc' could not be found in feature map.
2019-10-12 13:57:58 WARNING  rasa.core.featurizers  - Feature 'intent_calc_plus' could not be found in feature map.
2019-10-12 13:57:58 WARNING  rasa.core.featurizers  - Feature 'active_form_meeting_form' could not be found in feature map.
2019-10-12 13:57:58 WARNING  rasa.core.featurizers  - Feature 'entity_mathcalc' could not be found in feature map.
2019-10-12 13:57:58 WARNING  rasa.core.featurizers  - Feature 'intent_calc_plus' could not be found in feature map.

2019-10-13 09:08:21 WARNING  rasa.core.domain  - Failed to use action 'action_calc_plus' in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don't worry about this warning. It should stop appearing after a while. 
2019-10-13 09:08:21 WARNING  rasa.core.domain  - Failed to use action 'action_calc_minus' in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don't worry about this warning. It should stop appearing after a while. 
2019-10-13 09:08:21 WARNING  rasa.core.domain  - Failed to use action 'action_calc_divide' in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don't worry about this warning. It should stop appearing after a while. 
2019-10-13 09:08:21 WARNING  rasa.core.domain  - Failed to use action 'action_calc_multiply' in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don't worry about this warning. It should stop appearing after a while. 
2019-10-13 09:08:21 WARNING  rasa.core.domain  - Failed to use action 'action_calc_multiply' in history. Please make sure all actions are listed in the domains action list. If you recently removed an action, don't worry about this warning. It should stop appearing after a while. 

我已删除的插槽“mathcalc”和功能“intent_calc_plus”和操作“action_calc_plus”。仅当我删除对话表时,上述错误才会消失。是什么原因?我无法删除生产环境中的对话表。

非常感谢!

标签: rasa-nlurasa-corerasa

解决方案


看起来我回答得有点晚了,但就是这样。

您收到该错误是因为当用户重新启动与机器人的对话时,rasa 首先检索它之前与用户进行的对话(称为 a tracker)。这意味着在之前的对话中,它有 slot mathcalc。但是这次当它尝试填充 slotmathcalc时,它不能,因为这次它不存在。这就是您收到错误的原因。

这是跟踪器的外观:

{
 "sender_id": "2408196042602645",
  "slots": {
    "mathcalc": null,
    ...
  },
 "latest_message": {...},
 "events": [...]
}

为了解决这个问题,你应该用新数据重新训练你的机器人,它应该没问题。

当您删除conversations表时,此问题消失的原因是因为以前的对话不存在,因此它不会尝试重新创建最后一个对话。

希望有帮助。


推荐阅读