API.AI可以输入JSON以外的输入吗?(Can API.AI take input other than JSON?)

编程入门 行业动态 更新时间:2024-10-25 08:25:54
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.

更多推荐

本文发布于:2023-04-29 04:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1334578.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:AI   API   input   JSON

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!