【发布时间】:2021-07-05 13:52:36
【问题描述】:
我正在关注this tutorial,这是一个不错的开始,但遗漏了很多关于实施的细节。
组件 typescript 文件的第 4 行如下:
const dialogflowURL = 'https://us-central1-fireship-lessons.cloudfunctions.net/dialogflowGateway';
对于我的项目 id,yalebot-n9xq,我认为准确的 URL 是:
https://dialogflow.googleapis.com/v2/projects/yalebot-n9xq/dialogflowGateway
但是,curl https://dialogflow.googleapis.com/v2/projects/yalebot-n9xq/dialogflowGateway 给出了 404 响应:
<p>The requested URL <code>/v2/projects/yalebot-n9xq/dialogflowGateway</code> was not found on this server.
<ins>That’s all we know.</ins>
如果我的项目 id 是 yalebot-n9xq,我应该使用什么 URL?
- 我已为欢迎意图启用了 webhook。
- 如果我不使用 angular 并在本地提供服务
(curl http://localhost:5000/yalebot-n9xq/us-central1/dialogflowGateway),我会从 dialogflow 获得所需的响应。 -
ng serve产生http://localhost:4200/,但访问该站点或/#产生错误“无法获取 /”,这就是为什么我认为我的错误在于输入正确的 URL。
【问题讨论】:
标签: angular firebase chatbot dialogflow-es-fulfillment