Action'utter_greet'与模板/操作不对应。模块不包含具有该名称的类

问题描述 投票:0回答:1

我正在RASA 1.9.4上构建一个机器人,以下是我遇到的错误:

该漫游器没有任何自定义操作,仅发出响应。 Internet上没有此问题的解决方案,请帮助我解决该问题。

KeyError                                  Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/rasa_core/actions/factories.py in _action_class(action_name)
     47         try:
---> 48             cls = utils.class_from_module_path(action_name)
     49             return cls()

8 frames
KeyError: 'utter_greet'

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/rasa_core/actions/factories.py in _action_class(action_name)
     67                     "Module doesn't contain a class with this name. "
     68                     "Remember to prefix actions that should utter a template "
---> 69                     "with `utter_`. Error: {}".format(action_name, e))
     70 
     71     actions = []

ValueError: Action 'utter_greet' doesn't correspond to a template / action. Module doesn't contain a class with this name. Remember to prefix actions that should utter a template with `utter_`. Error: 'utter_greet'

以下是我的域文件中定义的utter_greet和故事的快照:

responses:
  utter_greet:
  - text: Hey! This is Kia, Your personal assistant. How can i help you?

* greet
  - utter_greet
* AI_def
  -utter_AI_def
* AI_importance
  -utter_AI_importance
python chatbot rasa-nlu rasa-core rasa
1个回答
0
投票

问题已解决。

最新版本的Rasa在域文件而不是Word模板中有响应。由于我分别安装了Rasa NLU和CORE,因此CORE无法识别单词response。这是一个很小的不匹配。

© www.soinside.com 2019 - 2024. All rights reserved.