slack - Rasa 实体在自定义消息中不可读

标签 slack rasa-nlu rasa-core rasa

正在使用 rasa 为 slack 构建一个对话式聊天机器人,一切正常,因此我决定添加一些带有自定义消息和按钮的交互式消息,但自定义消息中的实体不可读。

Rasa 版本:1.3.7

Python版本:3.7

问题:我想输出用户使用自定义键选择的实体。

使用 yaml 中的以下代码,它与文本键配合得很好:

utter_submit_leave_authorization:
  - text: "your request is under review following the parameters:\n
    - certificate: {certif_type}\n
    - Departure date: {dep_date}\n
    - Half day: {dep_date_half_day}\n
    - End date: {end_date}\n
    - Half day: {end_date_half_day}"

输出如下:

enter image description here

但如果使用带有以下代码的自定义键:

- custom:
    blocks:
    - type: section
      text:
        type: mrkdwn
        text: 'your request is under review following the parameters :'
    - type: section
      fields:
      - type: mrkdwn
        text: "*Departure date:*\n{dep_date}"
      - type: mrkdwn
        text: "*Half day:*\n{dep_date_half_day}"
      - type: mrkdwn
        text: "*End date:*\n{end_date}"
      - type: mrkdwn
        text: "*Half day:*\n{end_date_half_day}"
      - type: mrkdwn
        text: "*Type:*\n{certif_type}"

输出如下:

enter image description here

最佳答案

这是 Rasa 维护者之一。 感谢您详细的问题描述。这对我找到问题有很大帮助! 到目前为止,不支持在自定义消息的列表中插入实体。我创建了一个拉取请求,并将尽快合并并发布它。请关注 PR 以获取相关更新:https://github.com/RasaHQ/rasa/pull/4835

干杯, 托比

关于slack - Rasa 实体在自定义消息中不可读,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59029021/

相关文章:

slack-api - Slack + Botkit : Automatic reconnect after RTM closure

rasa-nlu - 为 Rasa nlu 返回 Null 的意图

python - 无法填写话语模板 - Rasa 聊天机器人

rasa-nlu - Rasa 聊天机器人可以发起对话吗?

rasa-nlu - 在 rasa 中训练模型后查找表不起作用

c# - 在 bot 框架中正确格式化消息以实现 slack

松弛错误 : failed with the error "invalid_blocks"

slack - Slack App安装中的环境变量?

nlp - 查找表在 Rasa NLU 的训练数据中不起作用

python - Rasa 聊天机器人不会回复某些消息