【问题标题】:Return image from actions in Rasa x从 Rasa x 中的操作返回图像
【发布时间】:2020-06-17 07:38:40
【问题描述】:

我就是这样做的:

dispatcher.utter_message(image='https://dvtb78sd925mn.cloudfront.net/wp-content/uploads/2018/10/15110630/exemplo-marketing-derelacionamento.png')

但是 rasa x 没有显示图像

【问题讨论】:

  • 这可能是因为安装包有问题或者它的依赖(例如numpymatplotlib)。是否安装正确?
  • 是的!在 rasa shell 中,返回一个图像链接,但在 rasa x 中没有。 @mrzrm

标签: python chatbot rasa-nlu rasa rasa-x


【解决方案1】:

我们可以从 RASA-X 中的自定义操作服务器返回图像。我使用以下代码从自定义操作服务器返回图像。在 actions.py 文件中, 使用下面的语句

dispatcher.utter_message(text="Test Image",image="http://localhost:7000/img/charts/TestImage.png")
return []

RASA-X 版本:“0.42.0”

RASA:“2.8.0”

【讨论】:

    【解决方案2】:

    记录在案(我猜你知道这些):论坛帖子https://forum.rasa.com/t/return-image-from-actions-in-rasa-x/25643/6 表明这是一个错误;错误在这里打开https://github.com/RasaHQ/rasa/issues/5388

    【讨论】:

      猜你喜欢
      • 2020-07-08
      • 1970-01-01
      • 2020-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-20
      • 2015-04-03
      相关资源
      最近更新 更多