Error:ApiAiPromises is not Defined

Thanks in advance
------------------------------------Code is as below-----------------------------------------------------------------------

import { Component,NgZone } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { Platform } from “ionic-angular”;

//declare var window:any;
declare var ApiAIPromises:any;
//declare const ApiAIPlugin: any;
@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
answer:String;
constructor(public navCtrl: NavController,public platform: Platform, public ngZone: NgZone) {
//ai
/*platform.ready().then(() => {
ApiAIPromises.init({
clientAccessToken: “4596e9d3a1b641db86d96a0ae86e165f”
})
.then((result) => console.log(result))

});

*/
platform.ready().then(() => {
ApiAIPromises.init({
clientAccessToken: “4596e9d3a1b641db86d96a0ae86e165f”
})
.then((result) => console.log(result))

});

//ai

}
ask(question) {
ApiAIPromises.requestText({
query: question
})
.then(({result: {fulfillment: {speech}}}) => {
this.ngZone.run(()=> {
this.answer = speech;
});
})
}

}

hello,

I do not see anything that is named ApiAi. So I do not know why you got this failure with this code. Otherwise it’s late.

Maybe if you want use ApiAi from Dialogflow and you have it installed via npm there is maybe an Import missing.

Best regards, anna-liebt

Hello,
I see, that is a different thing. It is really late.

Have you tried this.

Otherwise you can ask support or there forum. If you solve it, I would be very glad, when you share your solution.

Best regards, anna-liebt.

Hello,

I had declare varriable ApiAiPromises.
Installed cordova plugin.

But though getting this error.

Please solve error or you can git link for any ready AI projects.

Hello,

Please solve error or you can git link for any ready AI projects

is the error text?

I think a good idea is to use support from dialogflow.

Best regards, anna-liebt

No errorline is as under
"ApiAiPromises is nor defined"
So please solve this error.
Thanks for reply