我正在用rasa建立一个聊天机器人。在train_online.py
文件中有错误。你知道吗
我移到了rasa\u nlu==0.15.1的最新版本,但仍然得到了错误。你知道吗
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from rasa_core import utils, train
from rasa_core.training import online
from rasa_core.interpreter import NaturalLanguageInterpreter
logger = logging.getLogger(__name__)
def train_agent(interpreter):
return train.train_dialog_model(domain_file="horoscope_domain.yml",
stories_file="data/stories.md",
output_path="models/dialog",
nlu_model_path=interpreter,
endpoints="endpoints.yml",
max_history=2,
kwargs={"batch_size": 50,
"epochs": 200,
"max_training_samples": 300
})
if __name__ == '__main__':
utils.configure_colored_logging(loglevel="DEBUG")
nlu_model_path = "/home/zain/models/dialogue"
interpreter = NaturalLanguageInterpreter.create(nlu_model_path)
agent = train_agent(interpreter)
online.serve_agent(agent)
这就是错误
"".format(model_version, rasa_nlu.version)) rasa_nlu.model.UnsupportedModelError: The model version is to old to be loaded by this Rasa NLU instance. Either retrain the model, or run withan older version. Model version: 0.0.0 Instance version: 0.15.0
您的RASA版本似乎早于0.15。您可以通过使用命令重新训练模型来解决这个问题
但我建议您迁移到RASA的1.2.4版本。有许多变化,使我们易于使用RASA。我最近从版本0.14.1迁移到了版本1.2.4,这让我受益匪浅。你知道吗
如果您仍然希望使用版本0.15,那么请将此link用于RASA文档。否则你可以去找最近的RASA文档here。你知道吗
相关问题 更多 >
编程相关推荐