无法在对话流中重新启用 Cloud Functions for Firebase

Cannot re-enable Cloud Functions for Firebase in dialogflow

我在 dialogflow 代理中工作,我启用了 Cloud Functions for Firebase 并处理了我之前的意图。我在这个代理上禁用了它们,因为我无法在另一个代理上启用它们,我想看看这是权限问题还是代理之间存在差异。现在,一旦在以前工作的代理上禁用 Cloud Functions,我就无法在该代理上重新启用 Cloud Functions,因此我无法执行任何由 Cloud Functions 完成的工作。

在控制台中,我将开关从 DISABLED 切换到 ENABLED,UI 变化表明它应该被启用。像这样:

我注意到这里没有保存或部署按钮。不确定这是否是一个问题,但是当我点击侧边栏中的 Intents 然后点击 Fulfillment 时,屏幕再次看起来像这样,其中 Cloud Functions 被禁用:

我无法启用 Cloud Functions 的事实进一步证实了我在 Cloud Functions 中的最后日志是几天前我错误地禁用 Cloud Functions fulfillment 的事实。

我希望我在这里遗漏了一些简单的东西,但我在 dialogflow 文档中(目前)找不到任何东西来说明我遗漏的任何东西。我有点不知所措,因为它以前可以工作,现在我似乎无法重新打开它。

如有任何帮助,我们将不胜感激。谢谢!

该错误消息似乎与 Dialogflow 的执行限制有关。一旦在内联编辑器之外修改代码,就无法返回使用它,因此从现在开始您必须使用代码编辑器并使用 Firebase CLI 部署函数。您可以检查所有限制 here.

为了 运行 从内联编辑器编辑后的云功能,您必须将您的 firebase 功能 link 提供给 webhook。

在那里启用 webhook 服务并提供 link 您的云功能,它将按您的预期工作。

不幸的是,我自己也失去了使用快速 dialogflow 内联编辑器的能力,

"If you modify your function outside of inline code editor, you can no longer use the editor to modify your Cloud Function for Firebase. Your function will continue to provide fulfillment for your agent, but if you need to make changes, you will need to do so in the Firebase console."

截至今天,这是对话流的一个已知限制(请参阅对话流实现 Limitations

您应该导航到您的 firebase console,选择项目,单击左侧菜单上的开发 > 功能,然后在右侧的三个点上您可以删除您的功能。

然后,返回到 Dialogflow console 和 select 内联编辑器切换,如果它不能立即工作,请尝试刷新页面。