API.AI可以输入JSON以外的输入吗?(Can API.AI take input other than JSON?)
我是Dialogflow中的新成员,并且具有XML格式的报告,这是从我的内部应用程序生成的。 我想将该XML文件数据用作我的代理(在Dialogflow中创建)的输入。 可能吗?
I'm new in Dialogflow and I have a report in the XML format, which is generated from my internal application. I want to use that XML file data as an input for my Agent (created in Dialogflow). Is it possible?
最满意答案
是的,这是可能的。 你会在你的实现webhook中做什么,如下所示:
确定调用了哪个Intent以及可能需要调用内部应用程序的任何参数。 使用REST或类似的方式调用你的内部应用程序。 如果您使用的是类似node.js的东西,则需要将其作为具有Promises的异步函数来完成。 当你得到结果时,把它们作为你回应的一部分。Yes, this is possible. What you would do in your fulfillment webhook is something like the following:
Determine which Intent was called and any parameters you may need to make the call to your internal application. Call your internal application using REST or something similar. If you're using something like node.js, you'll need to do this as an asynchronous function with Promises. When you get the results back, present them as part of your response.更多推荐
发布评论