是否可以从我自己的 AoG 应用程序的实现中触发对 Google 应用程序的另一个操作?

Is it possible to trigger another Actions on Google app from within my own AoG app's fulfillment?

此问题专门针对 Google 应用上的操作,涉及触发 event/action 以使智能助理为最终用户选择另一个 AoG 应用的能力;专门用于触发其他人的 AoG 应用程序,而不是您编写的应用程序。

Idea: I want to create a custom AoG app. Something like planning-for-a-hike app. I want my user to be able to ask about the weather. At that point, I want to pass the flow over to an already existing app to get the weather. ie. while using my app the user says "Okay, sounds good. So what's the weather looks like today?" and at that point I want to trigger the default weather app by passing a specific phrase back to the assistant or writing an intent.

我熟悉从 fulfillment 发回的 Dialogflow 后续事件的概念,但我很确定我不能使用这样的意图来触发我没有编写的整个应用程序。据我了解,意图存在于应用程序中。 Google Assistant 决定触发哪个应用程序,在我看来它没有 API 公开该功能。

如果这样的事情是可能的,它会是什么样子?

谢谢!

调用 AoG 应用程序只能由 Google 完成,但您可以通过以下任一方式从您的 webhook 中使用来自不同 Dialogflow 代理的事件触发任何意图:

来自您的网络钩子的 GET 请求,例如:

curl \
-H "Authorization: Bearer YOUR_CLIENT_ACCESS_TOKEN" \
"https://api.dialogflow.com/v1/query?v=20150910&e=event_name&timezone=Europe/Paris&lang=en&sessionId=1234567890"

或 POST 请求 headers:

Authorization: Bearer YOUR_CLIENT_ACCESS_TOKEN
Content-Type: application/json

请求 body 如:

"event":{  
  "name":"<EVENT_NAME>",
  "data":{
      “<PARAMETER_NAME>”:”<PARAMETER_VALUE>”  
  },
  "timezone":"America/New_York",
  "lang":"en",
  "sessionId":"1321321"
}

注意您需要有权访问其他代理的 Dialogflow 访问令牌