如何通过rest-api与ubuntu vm上托管的Rasa chatbot进行交互 [英] How to interact with Rasa chatbot hosted on a ubuntu vm through rest-api's

查看:93
本文介绍了如何通过rest-api与ubuntu vm上托管的Rasa chatbot进行交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不熟悉使用Rasa构建聊天机器人.我已经使用Rasa核心构建了一个聊天机器人.我已按照本文档中提到的所有步骤进行操作.( https://legacy-docs.rasa.com/docs/core/quickstart/).

I am new to building chatbots using Rasa. I have built a chatbot using Rasa core. I have followed all the steps mentioned in this documentation.(https://legacy-docs.rasa.com/docs/core/quickstart/).

我正在Ubuntu虚拟机中运行该机器人.运行第六步并执行命令 python -m rasa_core.run -d models/dialogue -u models/current/nlu

I am running the bot in a Ubuntu virtual machine. After running the 6th step and the command python -m rasa_core.run -d models/dialogue -u models/current/nlu

我得到类似

root  - Rasa Core server is up and running on http://localhost:5005
Bot loaded. Type a message and press enter (use '/stop' to exit):

当我尝试与漫游器聊天时:

When I try to chat with the bot:

Your input ->  hello
Hey! How are you?
127.0.0.1 - - [2020-02-27 12:20:49] "POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1" 200 185 0.018887

我想知道0.018887的值是多少?我有正在运行的可调用api吗?假设我的vm ip是10.10.100.546,如何调用api?如果没有,我该如何构建一个REST API来与我的机器人进行交互.有参考吗?

I want to know what is this value of 0.018887? Do I have a callable api running? Suppose my vm ip is 10.10.100.546, how can I call the api? If not, how do I build a rest api to interact with my bot. Any references?

推荐答案

我真的建议在此处

I'd really recommend using a newer version of rasa here https://rasa.com/docs/rasa/ - the docs you refer to are for <1.0. The CLI became a lot more intuitive in 1.x.

但是,即使是旧版本,这里也指定了HTTP api:

Even in the case of the old version however, there is an HTTP api specified here: https://legacy-docs.rasa.com/docs/core/server/

应该可以帮助您入门.

这篇关于如何通过rest-api与ubuntu vm上托管的Rasa chatbot进行交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆