未连接Rasa自定义操作 [英] Rasa custom actions not connected

查看:388
本文介绍了未连接Rasa自定义操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我本周刚开始使用Rasa,但到目前为止,我对结果感到非常满意,因为它的响应很好,在其他方面也是如此.但是,我现在在actions.py文件中有自定义动作,但是当我进入rasa shell时,它似乎会完全丢失该文件并要求其他输入. (请参见下图)它甚至都没有给出错误.我在做什么错了?

So, I just started with Rasa this week, but I’m quite happy with the results so far, as in that it responds well et cetera. However, I now have custom actions in an actions.py file, but when I’m in the rasa shell it seems to miss that file entirely and asks for another input. (see the image below) It doesn't even give an error. What am I doing wrong?

我试图在另一个终端中运行"rasa run actions",在endpoints.yml文件中使用action_endpoint.

I tried to run "rasa run actions" in another terminal, with an action_endpoint in the endpoints.yml file.

在端点文件中:

`action_endpoint:
  url: "http://localhost:5055/webhook"`

这是我在单独的终端中运行的部分:

This is the part I'm running in the separate terminal:

`(actions) C:\.potato>python -m rasa_sdk --actions actions
2019-07-11 10:29:16 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
2019-07-11 10:29:17 INFO     rasa_sdk.executor  - Registered function for 'action_validate_cuisine'.
2019-07-11 10:29:17 INFO     rasa_sdk.executor  - Registered function for 'action_search_restaurants'.
2019-07-11 10:29:17 INFO     rasa_sdk.endpoint  - Action endpoint is up and running. on ('0.0.0.0', 5055)`

这是另一终端的输出:

`(cozmobot) C:\.potato>rasa shell
2019-07-11 10:49:36 INFO     root  - Starting Rasa Core server on http://localhost:5005
Bot loaded. Type a message and press enter (use '/stop' to exit):
Your input ->  Hi!
Hey! What's up?
Your input ->  I'm hungry
What kind of restaurant would you like?
Your input ->  I would like italian
Your input ->  <HERE AN ANSWER SHOULD BE GIVEN BY THE BOT VIA ACTIONS.PY>
Your input ->  /stop
2019-07-11 10:50:19 INFO     root  - Killing Sanic server now.`

机器人应在正确的餐厅回答第三个输入.但是由于某种原因,它不会在没有给出错误的情况下到达那里,而只是要求用户再次输入.

The third input should be answered by the bot with a correct restaurant. But for some reason it does not go there, without giving an error, and just asks for another input of the user.

推荐答案

您需要在命令中添加--endpoints标志,即运行

You need to add the --endpoints flag to the command, i.e. run

rasa shell --endpoints endpoints.yml

这篇关于未连接Rasa自定义操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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