【问题标题】:Rasa chatbot : Retrieving conversation dataRasa 聊天机器人:检索对话数据
【发布时间】:2018-05-17 07:48:21
【问题描述】:
我正在尝试使用 RASA 构建聊天机器人。现在,我在 Ubuntu shell 上本地运行我的聊天机器人。我希望能够检索我的对话数据;从 RASA 的文档来看,这似乎是可能的,但文档只解决了机器人在 http 服务器上运行的情况:link
【问题讨论】:
标签:
python-3.x
chatbot
rasa-nlu
rasa-core
【解决方案1】:
您可以添加一个Mongo or Redis tracker store,它将所有对话数据存储在数据库中。通过在端点配置中添加这样的部分来做到这一点:
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 指定此文件,例如
python -m rasa_core.run -d models --endpoints endpoints.yml
替代方法是使用公开的 Rest API 运行 Rasa Core,例如
python -m rasa_core.run -d models --enable-api
然后您可以使用记录在 here 中的 HTTP 请求访问对话,例如:
curl --request GET \
--url http://localhost:5005/conversations/<sender_id>/tracker