在我的stories.md
文件中,如果我有类似的内容
* mood_greet
- utter_happy
- utter_open_question
仅显示第一个说出的动作,即utter_happy
,而没有跟进utter_open_question
。我已经跟进了所有问题,发现的唯一解决方案是在第二个问题后加上第一个对话,并将其放在action
函数中。
对于像我这样的初学者,任何帮助都会受到高度赞赏。
答案 0 :(得分:1)
也许您使用的是带有错误的旧Rasa版本。在您显示的示例中,utter_happy
和utter_open_question
都实际上是预期的行为。
故事文件:
## Story 1
* greet
- utter_hello
- utter_how_can_I_help
域文件:
intents:
- greet
actions:
- utter_hello
- utter_how_can_I_help
templates:
utter_hello:
- text: "Hi"
utter_how_can_I_help:
- text: "How can I help you?"
如果您现在按照here训练Rasa Core,然后按照here运行Rasa Core,然后通过发送消息greet
来触发意图/greet
,它将发出:
Hi
How can I help you?
出现此行为的可能原因是:
*您没有在域文件中放置utter_open_question
的模板
*有问题的policy configuration
*您未使用Rasa NLU,并发送了类似“ Hello”的消息。使用不带NLU的Rasa Core并通过发送带有前缀/
和意图(例如/<intent_name>
)的消息来触发意图,或将Rasa Core与NLU连接。