我正在尝试使用RASA构建一个聊天机器人 . 现在,我在Ubuntu shell上本地运行我的聊天机器人 . 我的文档似乎是可能的,但是文档只解决了bot在http服务器上运行的情况:link
您可以添加Mongo or Redis tracker store,它将所有会话数据存储在数据库中 . 通过向 endpoints 配置添加这样的部分来执行此操作:
tracker_store: store_type: mongod url: <url to your mongo instance, e.g. mongodb://localhost:27017> db: <name of the db within your mongo instance, e.g. rasa> username: <username used for authentication> password: <password used for authentication>
然后在运行Rasa Core时使用 --endpoints 指定此文件,例如
--endpoints
python -m rasa_core.run -d models --endpoints endpoints.yml
另一种方法是使用暴露的Rest API运行Rasa Core,例如:
python -m rasa_core.run -d models --enable-api
然后,您可以访问带有HTTP请求的对话,如here所示,例如:
curl --request GET \ --url http://localhost:5005/conversations/<sender_id>/tracker
1 回答
您可以添加Mongo or Redis tracker store,它将所有会话数据存储在数据库中 . 通过向 endpoints 配置添加这样的部分来执行此操作:
然后在运行Rasa Core时使用
--endpoints
指定此文件,例如另一种方法是使用暴露的Rest API运行Rasa Core,例如:
然后,您可以访问带有HTTP请求的对话,如here所示,例如: