首页 > 解决方案 > 完成错误“不支持平台“GOOGLE_HANGOUTS”。”在点击 API 后使用内联编辑器完成我的代码时

问题描述

我正在使用 API 并将所需的值返回给聊天机器人。虽然我在 Dialogflow 的默认响应模拟器中得到了响应,但是对于相同的代码,我在环聊聊天 API 中没有得到任何响应(我已将 Dialogflow 与环聊聊天集成)。

function func_name(agent){
   const abcd = agent.parameters.abcd;
   agent.add(`Below are the products related to ${abcd}`);
   return axios.get(`https://*********************/****/${abcd}`)
      .then((result)=>{
         result.data.map(abcdObj => {
            agent.add(JSON.stringify(abcdObj.name+"~"+abcdObj.key));
   });
});

我收到的错误消息是:

Error: Platform 'GOOGLE_HANGOUTS' not supported. 
Function execution took 12 ms, finished with status: 'crash'

标签: node.jsdialogflow-es

解决方案


所以,在这里我得到了谷歌的解决方案。您必须在您的实现代码的 package.json 中将 dependencies 的版本、 dialogflow 版本升级到 0.7.0 和 dialogflow-fulfillment 到 0.6.1,如果您的机器人仍然无法工作,请尝试创建具有相同功能的新机器人。这肯定会有所帮助。


推荐阅读