如何使用agent.add()在Dialogflow Fulfillment中返回图像消息?

How to Use agent.add() to Return Image Messages in Dialogflow Fulfillment?

提问人:Tao 提问时间:11/8/2023 更新时间:11/8/2023 访问量:13

问:

在 Dialogflow (ES) 实现中,如何使用 agent.add() 返回图像消息,它的正确格式是什么?

我尝试使用 agent.add() 返回图像,就像我使用 Card 所做的那样,但它似乎不起作用。当我使用以下代码时:

agent.add(new Image({
  imageUri: "https://reactnative.dev/img/tiny_logo.png"
}));

我收到的发货消息是空的:

"fulfillmentMessages": [
  {
    "text": {
      "text": [
        ""
      ]
    }
  }
]

在 Dialogflow 中使用 agent.add() 返回图像消息的正确方法是什么?

图像 响应 dialogflow-es-fulfillment

评论


答: 暂无答案