[英]Rasa chatbot : Retrieving conversation data
I am trying to build a chatbot using RASA. 我正在尝试使用RASA构建一个聊天机器人。 For now, I am running my chatbot locally on a Ubuntu shell. 现在,我在Ubuntu shell上本地运行我的聊天机器人。 I'd like to be able to retrieve my conversation data ; 我希望能够检索我的会话数据; from RASA's documentation, it seems to be possible, but the documentation only addresses the case when the bot is running on a http server : link 从RASA的文档来看,它似乎是可能的,但文档仅解决机器人在http服务器上运行时的情况: 链接
You can add a Mongo or Redis tracker store which stores all the conversations data in a database. 您可以添加Mongo或Redis跟踪器存储 ,它将所有会话数据存储在数据库中。 Do so by adding a section like this to your endpoint configuration: 通过向端点配置添加这样的部分来执行此操作:
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>
Then specify this file with --endpoints
when you run Rasa Core, eg 然后在运行Rasa Core时使用--endpoints
指定此文件,例如
python -m rasa_core.run -d models --endpoints endpoints.yml
The alternative would be to run Rasa Core with the exposed Rest API, eg 另一种方法是使用暴露的Rest API运行Rasa Core,例如
python -m rasa_core.run -d models --enable-api
Then you can access the conversations with HTTP requests as documented here , eg: 然后,您可以访问此处记录的HTTP请求的对话,例如:
curl --request GET \
--url http://localhost:5005/conversations/<sender_id>/tracker
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.