在Dialogflow中从WebHook保留意图之间的数据 [英] Keeping data between intents from WebHook in Dialogflow

查看:49
本文介绍了在Dialogflow中从WebHook保留意图之间的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图构建一个电影机器人,我需要保存通过网络挂钩获得的电影的ID,并将其保存在可以通过后续意图访问的位置。

I'm trying to build a movie bot, and I need to save the ID from a movie which I got via my webhook, and keep it in a place where can be access by the follow up intents in that context.

现在,我使用实现中的有效负载将数据传递给第一个意图,但是在后续意图中,数据丢失了。

Right now I'm using the payload in fulfillment to pass data to the first intent, but in the follow up intents that data is lost.

推荐答案

您应该将要记住的数据包括在上下文。您应该将寿命设置为足够长,以适应需要该信息的所有意图。

You should probably include the data you want remembered across intents in a context. You should set the lifespan to be long enough for all the intents that will need the info.

这篇关于在Dialogflow中从WebHook保留意图之间的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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