2

我正在使用 Rasa 进行聊天机器人项目。它以前工作得很好,但现在我需要让它在另一台机器(Ubuntu,使用 python 3.6)上运行,我得到了奇怪的错误。

这是我的安装命令:

pip3 install rasa_nlu
pip3 install rasa_nlu[spacy]
pip3 install -U spacy
python3 -m spacy download fr
pip3 install rasa_core

然后我训练了 rasa-nlu :

python3 -m rasa_nlu.train -d data/intents.md -c config.yml

服务器使用以下命令运行:

python3 -m rasa_nlu.server --path models/nlu -c config.yml

我训练了 rasa-core :

python3 -m rasa_core.train -s data/stories.md -d domain.yml -o models/dialogue --epochs 300

但是当我尝试使用此命令运行核心服务器时:

python3 -m rasa_core.server -d models/dialogue -u models/nlu/default/myproject -o out.log

我收到了这个错误:

Failed to load any agent model.
Running Rasa Core server with out loaded model now.
The model version is to old to be loaded by this Rasa NLU instance.
Either retrain the model, or run with an older version.
Model version: 0.11.3
Instance version: 0.12.3

我改成"rasa_nlu_version""0.12.3"in models/nlu/default/myproject/metadata.json

现在我得到这个错误:

Failed to load any agent model.
Running Rasa Core server with out loaded model now.
'str' objet has no attribute 'get'

有人可以帮我调试吗?谢谢。

4

1 回答 1

3

您的答案在于错误消息本身。

Either retrain the model, or run with an older version.

Simply re-train the model and run the server and rasa_core again. Make sure that the model you're using to run the server is the same one specified in the training config file. i.e. ensure that you are loading the same model that you just trained and not an old model.

P.S.Changing the metadata.json file is a bad idea. It's created automatically when you train a model.

于 2018-06-09T13:51:53.740 回答