简体   繁体   English

如何将 Dialogflow CX 代理链接到 GCP 项目服务帐户?

[英]How to link Dialogflow CX agent to GCP Project Service Account?

I'm trying to link Dialogflow CX agent with service account on Google Cloud Platform console.我正在尝试将 Dialogflow CX 代理与 Google Cloud Platform 控制台上的服务帐户相关联。 This is for connecting my Dialogflow CX agent to node-red scenario.这是为了将我的 Dialogflow CX 代理连接到节点红色场景。 When I did it with Dialogflow ES it worked just fine.当我使用 Dialogflow ES 进行操作时,它工作得很好。 But with Dialogflow CX I just can't seem to get this moving.但是对于 Dialogflow CX,我似乎无法做到这一点。

I found similar error solved here: https://github.com/dialogflow/dialogflow-java-client-v2/issues/33我发现在这里解决了类似的错误: https ://github.com/dialogflow/dialogflow-java-client-v2/issues/33

But I don't get how they linked and solved it..但我不明白他们如何联系和解决它..

What I did are..我所做的是..

  1. I created new project on Dialogflow CX and a new agent.我在 Dialogflow CX 和一个新代理上创建了新项目。
  2. Then I get into Google Cloud console and connect to the new project.然后我进入 Google Cloud 控制台并连接到新项目。 There, under IAM and administrator section there's Service Account page.在那里,在 IAM 和管理员部分下有服务帐户页面。 There is nothing.空无一物。
  3. So I create a new service account and also create JSON key file.所以我创建了一个新的服务帐户并创建了 JSON 密钥文件。
  4. Now when I go back to Dialogflow CX console and see Share page in Agent Settings, I see the service account I just made on GCP console.现在,当我返回 Dialogflow CX 控制台并查看代理设置中的共享页面时,我会看到我刚刚在 GCP 控制台上创建的服务帐户。

But I still get the error message as follows: "Error: 5 NOT_FOUND: com.google.apps.framework.request.NotFoundException: No DesignTimeAgent found for project 'divine-course-354701'."但我仍然收到如下错误消息:“错误:5 NOT_FOUND: com.google.apps.framework.request.NotFoundException: No DesignTimeAgent found for project 'divine-course-354701'。”

If anybody has a clue please let me know.如果有人有线索,请告诉我。 Thank you so much in advance!非常感谢您!

  1. If you have used the Dialogflow CX console to create the Agent, then there is a Google Cloud project that is created behind the scenes for you and you have to work with that Project.如果您已使用 Dialogflow CX 控制台创建代理,那么会在幕后为您创建一个 Google Cloud 项目,您必须使用该项目。

  2. Each Google Cloud Project has a Name and a Project ID.每个 Google Cloud 项目都有一个名称和一个项目 ID。 You should use the Project Id.您应该使用项目 ID。 To get the Google Cloud Project Id for your Agent, go to the Project dropdown list at the top of the console and select view all projects.要获取代理的 Google Cloud 项目 ID,请转到控制台顶部的项目下拉列表,然后选择查看所有项目。 You will see the specify Project Name and Project Id.您将看到指定的项目名称和项目 ID。 Make sure that you are working with the Project Id because that is what is unique across the whole Google Cloud namespace.确保您使用的是项目 ID,因为它在整个 Google Cloud 命名空间中是唯一的。

  3. If you go to the Google Cloud console page, make sure that you work with that specific Project Id, enable the Dialogflow APIs and export the Service Account keys with the right permission.如果您转到 Google Cloud 控制台页面,请确保您使用该特定项目 ID,启用 Dialogflow API 并导出具有正确权限的服务帐户密钥。

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

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