下载
Rasa
https://download.csdn.net/download/Da___Vinci/12404001
Rasa-x
https://download.csdn.net/download/Da___Vinci/12403992
安装
找个位置存放,cd到那个目录执行安装,注意你的pip版本,我的是3.7,如果装了多个pyhon,建议使用pip3.7 pip3.6 这样执行
pip3.7 install rasa-1.10.0-py3-none-any.whl
pip3.7 install rasa_x-0.28.1-py3-none-any.whl
安装过程会顺带安装所有依赖包,建议有全局加速方法。
或者这样可以直接安装
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
启动
装好后的Rasa是可以命令行启动的
构建第一个Rasa项目
新建一个项目文件夹,cd到下面,执行下面代码,即可构建一个Rasa项目,我的运行过,所以文件可能多一些.
rasa init --no-prompt
和他对话
上面运行完一个机器人就训练好了,可以进行简单对话,使用Rasa-x来进行可视化对话
同样是在项目根目录下执行命令
rasa x
如果报错,git相关的如:
Traceback (most recent call last):File "e:\dataanalysis\tools\python3\lib\site-packages\git\__init__.py", line 83, in <module>refresh()File "e:\dataanalysis\tools\python3\lib\site-packages\git\__init__.py", line 73, in refreshif not Git.refresh(path=path):File "e:\dataanalysis\tools\python3\lib\site-packages\git\cmd.py", line 278, in refreshraise ImportError(err)
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:- be included in your $PATH- be set via $GIT_PYTHON_GIT_EXECUTABLE- explicitly set via git.refresh()All git commands will error until this is rectified.
这样执行即可
>set GIT_PYTHON_REFRESH=quiet
>rasa x