我正在尝试使用RASA构建一个简单的机器人,首先,只需要返回简单的文本作为响应。
更新的文件内容如下:
stories.md:
## path_1
* condition
- utter_condition
## path_2
* pictures
- utter_pictures
## path_3
* elevator
- utter_elevator
domain.yml:
intents:
- condition
- pictures
- direction
responses:
utter_condition:
- text: "Let me get the details on the condition"
utter_pictures:
- text: "Ok, for more pictures here is the way"
utter_direction:
- text: "You want to know about the direction"
utter_tour:
- text: "about the tour"
RASA正确识别意图,但始终返回以下内容作为响应选择器的o/p:
"response_selector": {
"default": {
"response": {
"name": null,
"confidence": 0.0
},
"ranking": [],
"full_retrieval_intent": null
}
},
如果它不返回任何";话语_;故事中配置的响应?我该如何解决这个问题?
我发现了发生这种情况的几个原因
- 第一次,stories.md文件被放置在错误的位置
- 由于domain.yml格式错误,问题再次出现
运行时
rasa train
请确保您没有以下警告:
/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa/utils/common.py:363: UserWarning: Loading domain from 'domain.yml' failed. Using empty domain. Error: 'The provided yaml file is invalid. You can use http://www.yamllint.com/ to validate the yaml syntax of your file.'
如建议http://www.yamllint.com/非常有助于格式化。