如何将响应值从扩展名传递到IBM Watson Assistant聊天中的自定义响应类型?
以下JSON定义了客户端的自定义响应以允许自定义UI。根据文档 https:/// cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-response-types-referend#user_defined 我可以为“ user_defined”对象定义“任何东西”我的扩展响应提供的变量。
{
"generic": [
{
"user_defined": {
"default_color": "blue",
"template_name": "color_picker",
"my_response_value": "???"
},
"response_type": "user_defined"
}
]
}
The below JSON defines custom response for the client to allow custom UI. As per the documentation https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-response-types-reference#user_defined I can define "anything" for the "user_defined" object but I am failing to understand how to pass the variable as provided by my extension response.
{
"generic": [
{
"user_defined": {
"default_color": "blue",
"template_name": "color_picker",
"my_response_value": "???"
},
"response_type": "user_defined"
}
]
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,经过一定的反复试验,似乎它与此处所述的lang表达式合作 https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-call-call-call-extension #extension #extension #extension-check-check-
status 属性“ my_second_value”将被“会话变量/扩展响应”中的值代替。您的参考将在
步骤
值和结果
值中有所不同。So after some trial and error it seems that it works with the expression lang as described here https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-call-extension#extension-check-status
For example
Here the property "my_second_value" will be replaced by the value from the "session variables/extension response". Your reference will differ in the
step
value andresult
value.