【问题标题】:Rasa error when set use_entities to [ ] in domaim.yml在 domaim.yml 中将 use_entities 设置为 [ ] 时出现 Rasa 错误
【发布时间】:2021-06-18 17:43:14
【问题描述】:

我希望某些意图没有任何实体,但根据文档 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.'

【问题讨论】:

    标签: python rasa-nlu rasa rasa-core


    【解决方案1】:

    你只是缺少一个缩进:

    intents:
      - greet:
          use_entities: []
      - goodbye
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-15
      • 1970-01-01
      • 1970-01-01
      • 2020-09-23
      • 2015-02-13
      • 2022-06-26
      • 1970-01-01
      • 2017-06-19
      相关资源
      最近更新 更多