在客户端的对话框流请求中传递键值 [英] Passing key value in the dialog flow request from client
本文介绍了在客户端的对话框流请求中传递键值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在初始请求中将某些键值对象传递给webhook中可能需要的dialogflow?
Is it possible to pass some key value objects in the initial request to dialogflow which maybe needed in the webhook?
推荐答案
调用 /查询
时,可以通过以下三种方式之一包含键:值数据:
When you call /query
, you can include key:value data in one of three ways:
- 将其包含在分配给
originalRequest
字段的对象中。 - 包含一个上下文,该上下文包含一个包含您的密钥的对象:在其
参数
字段中输入值数据。 - 触发一个事件,该事件的对象包含您的键:值数据在其<$ c $中c> data 字段。
- Include it in an object assigned to the
originalRequest
field. - Include a context that has an object containing your key:value data in its
parameters
field. - Trigger an event that has an object containing your key:value data in its
data
field.
您可以在 / query
请求格式为 Dialogflow的API参考
您传递的值将在所有出现的webhook请求中可用。上下文值也可用于模板化您的意图的响应。
The values you pass will be available in any resulting webhook request. Context values will also be available for templating into your intents' responses.
这篇关于在客户端的对话框流请求中传递键值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文