jovotech / jovo-framework

🔈 The React for Voice and Chat: Build Apps for Alexa, Messenger, Instagram, the Web, and more
https://www.jovo.tech
Apache License 2.0
1.67k stars 310 forks source link

NLU missing properties when using Facebook Messenger Platform with Lex #1358

Open jrglg opened 2 years ago

jrglg commented 2 years ago

I'm submitting a...

Current Behavior

Jovo ìnput object doesn't have nlu property when using Lexv2 plugin, but it does when using Nlp.js plugin. Also, the tsame Lex plugin is working in Jovo Debugger.

So, no intent is present and UNHANLDED is always matched.

Lexv2 Plugin:

export const lexNluPlugin = new LexSlu({
  bot: {
    id: 'X',
    aliasId: 'X',
  },
  locale: 'es_ES',
  region: 'eu-west-1',
  credentials: {
    accessKeyId: 'X',
    secretAccessKey: 'X+LKgu',
  },
  fallbackLocale: 'es_ES',
  asr: true,
  nlu: true
});

Faceboook platform plugin (missing nlu in input):

new FacebookMessengerPlatform({
  pageAccessToken:
    'xxxxx',
  verifyToken: 'xxxxx',
  plugins: [lexNluPlugin],
  session: {
    expiresAfterSeconds: 5,
  },
  enabled: true,
  skipTests: true,
}),

Jovo Debugger plugin (nlu is present in input):

new JovoDebugger({
  skipTests: true,
  nlu: lexNluPlugin,
  webhookUrl: 'https://webhook.jovo.cloud',
  debuggerConfigPath: './jovo.debugger.js',
  modelsPath: './models',
  enabled: true,
  ignoredProperties: ['$app', '$handleRequest', '$platform', '$mongoDb'],
}),

Your Environment

jankoenig commented 2 years ago

Hi @jrglg,

Quick question for debugging: Does it work if you set asr: false in the LexSlu config?

jrglg commented 2 years ago

Hi @jankoenig,

no, same result.

This doesn't help neither

  input: {
    supportedTypes: ['TEXT']
  },