对话型 Action 可让您为 Google 助理用户创建自定义体验或对话,从而扩展了 Google 助理的功能。在对话中,对话型 Action 会处理来自 Google 助理的请求,并返回包含音频和视觉组件的响应。对话型 Action 还可以使用网络钩子与外部 Web 服务通信,以增加对话或业务逻辑,然后再返回响应。
若要查询天气预报,您可能需要一些信息,例如用户需要天气预报的时间及其位置。不过,如前所述,不同的用户请求预测的方式可能会有所不同。Google 助理可以理解这些差异并将其转换为标准用户意图,以获取预测。然后,它可以解析用户的请求,以获取满足请求所需的相关数据。在本例中,这就是用户希望获取天气预报的时间和地点。最后,您可以使用此数据通过公共 REST API 查找天气信息,并以提示的形式将天气信息返回给用户。
[null,null,["最后更新时间 (UTC):2023-12-01。"],[[["Conversational Actions on Google Assistant let you create custom voice experiences for users by handling requests and returning audio/visual responses."],["Assistant's natural language understanding (NLU) handles language nuances, making it easier to build conversational interfaces compared to traditional structured input methods."],["Conversational Actions are best for simple, quick tasks, or immersive, voice-forward experiences."],["You can build Actions with the Actions SDK, Actions Builder, or both, offering flexibility in your development workflow."]]],["Conversational Actions create custom Google Assistant experiences, handling user requests and returning responses with audio and visual components. Assistant manages natural language understanding, translating varied user inputs into structured intents. Actions excel in tasks requiring simple, familiar input, providing quick user benefits, or leveraging voice-first interactions. Developers can build using the Actions SDK, Actions Builder, or a mix of both, offering flexibility in development workflows. The process includes defining user intents, parsing data, and utilizing webhooks to generate customized responses.\n"]]