简体   繁体   English

Google Assistant SDK - 操作从 SQL 服务器获取信息

[英]Google Assistant SDK - Actions get information from SQL Server

I'm trying to make my own Google Assistant Actions.我正在尝试制作自己的 Google 助理操作。

I would like to ask a question.我想问一个问题。 SQL Server is the data source for this. SQL 服务器是这个的数据源。 Google Assistant is searching my SQL Server for results. Google 助理正在搜索我的 SQL 服务器以获取结果。 When it finds the result, it reads out the result.当它找到结果时,它会读出结果。 Would this be possible?这可能吗? Where can I search or read for more information about how to do this?我在哪里可以搜索或阅读有关如何执行此操作的更多信息?

What you are looking for is called Actions on Google broadly.您要查找的内容广泛称为Google 上的操作 Specifically, you're looking to build a conversational action where the user can ask questions that match Intents that you provide to the Assistant to match.具体来说,您希望构建一个对话操作,用户可以在其中提出与您提供给助手以匹配的 意图相匹配的问题。 When an Intent is matched, the information is passed to your code, which is running as awebhook , to generate a response .当 Intent 匹配时,信息将传递给您的代码,该代码作为webhook运行,以生成 响应

Your webhook can do pretty much whatever you want, as long as you do it quickly enough (in about 5 seconds) and return a response.你的 webhook 几乎可以做任何你想做的事情,只要你做的足够快(大约 5 秒)并返回一个响应。 This can include database queries or any other processing or business logic necessary.这可以包括数据库查询或任何其他必要的处理或业务逻辑。 Details about doing so for SQL Server are out of the scope for this particular question - but it should be very similar to doing SQL Server queries from any other server you're running.对于 SQL 服务器执行此操作的详细信息不在此特定问题的 scope 中 - 但它应该与从您运行的任何其他服务器执行 SQL 服务器查询非常相似。

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

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