本文介绍了将MySQL数据库连接到Google Assistant的可能性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我要实现的至少是使用本地MySQL数据库的Google Assistant Action的工作原型。我所教的是MySQL DB-> Google Cloud Platform-> DialogFlow-> Google Assistant。What I want to implement is at least a working prototype of a Google Assistant Action with the use of local MySQL database. What I've taught of is MySQL DB-> Google Cloud Platform-> DialogFlow -> Google Assistant.例如,最终产品将是:我的总销售额是多少,Google助手会从MySQL检索数据。我一直在尝试在线寻找解决方案,但似乎都找不到我想要的解决方案。这个解决方案在理论上可行吗?以及如何通过DialogFlow将云平台集成到Google Assistant Action中?谢谢!So the end product would be for example, I say: "What is my total sales" and Google Assistant would retrieve the data from MySQL. I've been trying to look for solutions online and none seem to match what I am looking for. Would this solution be theoretically possible? and how would I be able to integrate the cloud platform into the Google Assistant Action through DialogFlow? Thanks!推荐答案有可能! 创建Dialogflow代理。定义您的意图并添加静态响应。测试。 一旦测试通过,请使用左侧的集成标签将其与Google Actions-On集成。 测试助手 当Assistant准备好静态响应时,开发一个Webhook 。您可以在NodeJS中使用其他客户端库( AoG客户端或 Dialogflow Client )或Python(助手助手或 Dialogflow客户端),也可以创建自己的对话框。 一旦Webhook准备就绪,请在本地运行它,并使用 NGROK 。 使用生成的URL作为Dialogflow代理的实现,并更新助手的草稿版本。 创建一个MySQL数据库并使用常规 NodeJS 或 Python 代码 重新启动服务器并端对端进行测试! 在本地进行一次测试使用NGROK,您可以将其推送到云( NodeJS 或 Python )或任何其他服务器。Create a Dialogflow agent. Define your intents and add the static response. Test it.Once tests are passed, integrated it with Actions-On-Google using "Integration tab" to the left.Test the Assistant with static responses.When Assistant is ready with the static response, develop a webhook. You can use different client libraries in NodeJS (AoG Client or Dialogflow Client) or in Python (Flask-Assistant or Dialogflow Client) or can create your own.Once the webhook is ready, run it locally and expose to the internet using NGROK.Use the generated URL as fulfillment to the Dialogflow agent and update the assistant's draft version.Create a MySQL DB and connect it webhook using regular NodeJS or Python codeRestart the server and test end to end!Once tested locally with NGROK, you can PUSH it to the cloud (NodeJS or Python) or any other server. 这篇关于将MySQL数据库连接到Google Assistant的可能性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-03 22:49