python - 在 domaim.yml 中将 use_entities 设置为 [ ] 时出现 Rasa 错误
问题描述
我希望某些意图没有任何实体,并且根据文档https://rasa.com/docs/rasa/domain#ignoring-entities-for-certain-intents尝试执行此操作时出现错误
domain.yml 文件
intents:
- greet:
use_entities: []
- goodbye
我收到以下错误
/home/venv/lib/python3.8/site-packages/rasa/shared/utils/io.py:97: UserWarning: Loading domain from 'domain.yml' failed. Using empty domain. Error: 'In the `domain.yml` file, the intent 'greet' cannot have value of `<class 'NoneType'>`. If you have placed a ':' character after the intent's name without adding any additional parameters to this intent then you would need to remove the ':' character. Please see https://rasa.com/docs/rasa/domain for more information on how to correctly add `intents` in the `domain` and https://rasa.com/docs/rasa/domain#intents for examples on when to use the ':' character after an intent's name.'
解决方案
你只是缺少一个缩进:
intents:
- greet:
use_entities: []
- goodbye
推荐阅读
- python - Python,将结果存储在字典或类似文件中
- python - 无法正确存储最佳神经元列表
- javascript - 为什么评论没有立即出现在我的 React 应用项目中?
- regex - Powershell转换字符串不起作用
- facebook - 从 Facebook 应用程序访问用户 Facebook Messenger 收件箱
- r - 如何删除特定列中具有 NA 的行,但前提是它们在另一列中有重复?
- pandas - ValueError:给定的列不是数据框的列
- xamarin - 首次访问后无法导航回 Xamaran Shell 页面
- sql - Laravel,显示大数据的查询很慢
- java - okhhtp3 mockserver java.lang.NoClassDefFoundError: okhttp3/internal/concurrent/TaskRunner$RealBackend