简体   繁体   English

如何在dialogflow的内联编辑器中进行第三方api调用

[英]How to make 3rd party api call in dialogflow's inline editor

How to make 3rd party api call in dialogflow using inline editor please share if you have some code regarding this. 如何使用内联编辑器在dialogflow中进行第三方api调用,如果有与此相关的代码,请分享。 Thank you 谢谢

You cannot make external network requests (for example an API call) from the inline editor. 您不能从嵌入式编辑器发出外部网络请求(例如API调用)。 You need to deploy your code elsewhere. 您需要将代码部署到其他地方。 The easiest way to do this is by deploying to a paid Firebase plan. 最简单的方法是部署到付费Firebase计划。 From Google : 来自Google

Network calls originating from your Cloud Function for Firebase to destinations outside Google's network require billing to be enabled for the underlying Google Cloud or Firebase project. 从您的Firebase的Cloud Function发起的到Google网络外部目标的网络调用要求为基础Google Cloud或Firebase项目启用计费。

You can create an API with the technology that you want, as long as the response from the API can be understand by Dialogflow. 您可以使用所需的技术来创建API,只要Dialogflow可以理解API的响应即可。

You need to configure it by going to Fulfillment , and point it to your API. 您需要转到Fulfillment进行配置,然后将其指向您的API。

The API needs to respond with this structure: Dialogflow . API需要使用以下结构进行响应: Dialogflow

And If you plan to integrate with Actions on Google, you have this repository which includes some examples of responses. 而且,如果您打算与Google的Actions集成,那么您将拥有此存储库 ,其中包含一些响应示例。

And here you have some libraries to interact with Dialogflow with different languages. 在这里,您有一些库可以与Dialogflow使用不同的语言进行交互。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM