Carlos Carlos - 3 years ago 209
Node.js Question

Api.Ai falls on textRequest to default fallback intent

I'm using Api.Ai (Node.Js SDK Version 2.0.7 and also upgraded to 4.0.3) and making textRequests to my Agent.

Without any change on my side appearantly half of the intents are not working anymore (the default intent comes instead).

The sentences are proved to work and ApiAi should recognize the correct intent.
In the ApiAi Console these sentences are working!

I could not determine why 50% of my intents are not recognized anymore. Some that are still recognized are a sentence others one word, some have parameters some not ...

My Agent has a lot of intents, maybe it is related to this (51 Intents).

Does someone have similiar issues and maybe found a solution?
It looks like a problem on Api.Ai Side, does someone know if there is a good place to file a bug on their side?


Answer Source

Seems like we got a way to fix the problem.

Someone from Google suggested over here (, to use the "lang" parameter. I haven't used it before as it is stated nowhere to use it.

I searched the sources and found out, the parameter "lang" is instead the parameter "language".

When i set it to "de", corresponding to my bot speaking "German", it does work again...

var apiai = new p.apiai("key", {"language":"de"});

try adding the "language" parameter to the options object, when instantiating the apiai library.

Does it work for you?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download