我的angular 8应用程序在Chrome和IE11上都工作得很好。但现在在我添加了聊天机器人代码后,它不能加载到IE11上,聊天机器人在api-ai-javascript@2.0.0-beta.21库的帮助下与Dialogflow通信。它在chrome上工作得很好。另外,我在IE的控制台上也看不到任何错误。
我关注了几乎所有可用的类似主题的链接,并体验到即使是Github上可用的样本也是以类似的方式运行的。如果你在chrome上打开this,它可以工作,但不能在IE11中工作。同样,this GitHub example在Chrome上运行得很好,但在IE11上就不行。
如果有人能指导我,那将是很大的帮助。因此,聊天机器人代码也开始在IE11上工作。
我是开放的张贴任何代码,如果需要的答案。这是我的聊天服务类。
import { ApiAiClient } from 'api-ai-javascript/es6/ApiAiClient';
....
export class ChatService {
....
readonly client = new ApiAiClient({ accessToken: this.token });
....
public converse(msg: string) {
const userMessage = new Msg(msg, 'user');
this.update(userMessage);
return this.client.textRequest(msg)
.then(res => {
const speech = res.result.fulfillment.speech;
const botMessage = new Msg(speech, 'bot');
this.update(botMessage);
});
}
....发布于 2020-06-13 12:07:14
已弃用
此Dialogflow客户端库和Dialogflow API V1已弃用,将于2019年10月23日关闭。请迁移到Dialogflow接口V2。
对于V2接口,您可以按照https://chatbotslife.com/dialogflow-v2-rest-api-communication-6cf7ab66ab36
https://stackoverflow.com/questions/62348388
复制相似问题