获取原始参数输入-Dialogflow实现 [英] Get original parameter input - Dialogflow Fulfillment

查看:68
本文介绍了获取原始参数输入-Dialogflow实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在执行代码中获取参数的原始输入。

I want to get the original input of a parameter in my fulfillment code.

我尝试过:

var time = agent.parameters.time.original

但是结果是不确定的。

我尝试过:

var query = agent.query

但无法准确解析我需要原始输入的参数。

but could not accurately parse the parameter I need the original input of.

推荐答案

根据在旧API.ai话语论坛上的答案,看起来原始参数可能仅在Webhook履行请求中可用,前提是您在意图。那时,原始参数应该在请求的上下文键中可用。

According to an answer on the old API.ai discourse forums, it looks like original parameters may only be available in a webhook fulfillment request if you set a context on the intent. At that point, the original parameter should be available in the contexts key in the request.

这篇关于获取原始参数输入-Dialogflow实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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