Webchat not working without nlu

#1

So I disabled “nlu” and tried to open webchat (theurl/s/bot-name) only to get error Shortlink "cs-bot" not registered in the browser.

CLI with nlu disabled


DigiSensei@gtermadminpc0254 MINGW64 /c/Projects/Debug/Dev Bot V1
$ ./bp
14:54:41.917 Launcher ========================================
                                  Botpress Server
                                   Version 11.7.1
                                      OS win32
                      ========================================
14:54:42.938 Launcher Using 6 modules
                      ⦿ MODULES_ROOT/analytics
                      ⦿ MODULES_ROOT/basic-skills
                      ⦿ MODULES_ROOT/builtin
                      ⊝ MODULES_ROOT/channel-messenger (disabled)
                      ⊝ MODULES_ROOT/channel-telegram (disabled)
                      ⦿ MODULES_ROOT/channel-web
                      ⦿ MODULES_ROOT/hitl
                      ⊝ MODULES_ROOT/nlu (disabled)
                      ⦿ MODULES_ROOT/qna
14:54:43.164 ModuleLoader File 00_custom_analytics.js has been changed manually, skipping...
14:54:43.508 ModuleLoader File 00_create_shortlink.js has been changed manually, skipping...
14:54:43.647 Server Loaded 6 modules
14:54:43.721 CMS Loaded 6 content types
14:54:44.976 BotService Cannot mount bot "test". Make sure it exists on the filesytem or the database.
HTTP (get) URL http://localhost:3000/api/v1/bots/test/mod/nlu/intents
Received "<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
< (...)"
Request failed with status code 404
STACK TRACE
Error: Request failed with status code 404
    at createError (C:\Projects\Debug\Dev Bot V1\modules\.cache\module__09dcce890fb5e392bef50e8c67c820ab6e4a1a82bf5dc598bd493d4934e12e66\node_production_modules\axios\lib\core\createError.js:16:15)
    at settle (C:\Projects\Debug\Dev Bot V1\modules\.cache\module__09dcce890fb5e392bef50e8c67c820ab6e4a1a82bf5dc598bd493d4934e12e66\node_production_modules\axios\lib\core\settle.js:18:12)
    at IncomingMessage.handleStreamEnd (C:\Projects\Debug\Dev Bot V1\modules\.cache\module__09dcce890fb5e392bef50e8c67c820ab6e4a1a82bf5dc598bd493d4934e12e66\node_production_modules\axios\lib\adapters\http.js:201:11)
    at IncomingMessage.emit (events.js:187:15)
    at IncomingMessage.EventEmitter.emit (domain.js:442:20)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
14:54:45.186 BotService Cannot mount bot "cs-bot". Make sure it exists on the filesytem or the database.
HTTP (get) URL http://localhost:3000/api/v1/bots/cs-bot/mod/nlu/intents
Received "<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
< (...)"
Request failed with status code 404
STACK TRACE
Error: Request failed with status code 404
    at createError (C:\Projects\Debug\Dev Bot V1\modules\.cache\module__09dcce890fb5e392bef50e8c67c820ab6e4a1a82bf5dc598bd493d4934e12e66\node_production_modules\axios\lib\core\createError.js:16:15)
    at settle (C:\Projects\Debug\Dev Bot V1\modules\.cache\module__09dcce890fb5e392bef50e8c67c820ab6e4a1a82bf5dc598bd493d4934e12e66\node_production_modules\axios\lib\core\settle.js:18:12)
    at IncomingMessage.handleStreamEnd (C:\Projects\Debug\Dev Bot V1\modules\.cache\module__09dcce890fb5e392bef50e8c67c820ab6e4a1a82bf5dc598bd493d4934e12e66\node_production_modules\axios\lib\adapters\http.js:201:11)
    at IncomingMessage.emit (events.js:187:15)
    at IncomingMessage.EventEmitter.emit (domain.js:442:20)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
14:54:45.188 Server Started in 2248ms
14:54:45.188 Launcher Botpress is ready at http://localhost:3000/

CLI with NLU enabled


DigiSensei@gtermadminpc0254 MINGW64 /c/Projects/Debug/Dev Bot V1
$ ./bp
14:57:47.662 Launcher ========================================
                                  Botpress Server
                                   Version 11.7.1
                                      OS win32
                      ========================================
14:57:50.986 Launcher Using 7 modules
                      ⦿ MODULES_ROOT/analytics
                      ⦿ MODULES_ROOT/basic-skills
                      ⦿ MODULES_ROOT/builtin
                      ⊝ MODULES_ROOT/channel-messenger (disabled)
                      ⊝ MODULES_ROOT/channel-telegram (disabled)
                      ⦿ MODULES_ROOT/channel-web
                      ⦿ MODULES_ROOT/hitl
                      ⦿ MODULES_ROOT/nlu
                      ⦿ MODULES_ROOT/qna
14:57:51.195 ModuleLoader File 00_custom_analytics.js has been changed manually, skipping...
14:57:51.539 ModuleLoader File 00_create_shortlink.js has been changed manually, skipping...
14:57:51.839 Server Loaded 7 modules
14:57:51.919 CMS Loaded 6 content types
14:57:54.536 Server Started in 3549ms
14:57:54.537 Launcher Botpress is ready at http://localhost:3000/

I dont want NLU because it messesmy bot by creating inaccurate models and giving users queer responses. And I also dont want to simply migrate to another 11.7.4

Any suggestions?

#2

Hi @DigiSenseiZim, so NLU has been greatly improved on later versions. Maybe if you explain what you’re trying to do, we can help you with your NLU.

If you really don’t want NLU, you can remove all intents / entities and QNA. This way it won’t match to anything. I’m not sure that you can disable the NLU module. Botpress depends on it pretty much. In fact, we’re probably going to move it into core soon.

So yeah, please explain how the NLU is misbehaving so we can help and maybe try the new versions of Botpress :slight_smile:

#3

Thanks for taking the time to respond @rndlaine ? Okay here goes…

Every time I use a bot for a bit I end up with a folder called models in data/bots/my-bot . Everytime those files appear everything goes south. For example, instead of just giving the correct response to common greetings like ‘hie’ nlu looks for a qna with the highest occurence of the word hie in its example phrases and is ‘confident’ that its the right one. It then goes on to create that as an acceptable model. This makes the user interaction poor because, in turn, no one is ‘confident’ to interact with a bot which gets it wrong the first time.

So I have to do the whole const path = require('path'); const fs = require('fs'); const rmDir = function (dirPath, removeSelf) to delete the models folder and I cant port this piece of code in a useful manner when deploying to Heroku using Docker because I have to put it on bot mount so it runs and that means disabling and enabling my heroku app which is really cumbersome and unnecesary.

Then I go on to disable the nlu module and leave the qna module enabled but now its pretty apparent that the two are dependent of each other so I am stuck and frustrated in a LARGE way

Meanwhile it would really be swell if you could simply update the Dialogflow connector. The reason I cannot do that is I have to go through an API reference which has some parts still un-updated and is still evolving. Then I have to review the last dialogflow connector on BPX. Then I have to wrap my head around the new hooks & middleware system and find the bits in typescript then edit those and start another very long sojourn on Github, a service which I hate for (user interface / language localization / {supposedly} allowing hackers to completely wipe out my footprint there anyway).

You obviously have a zero learning curve and could easily review and update that connector within an hour. But I know it will never be prioritised as it conflicts with the developers team vision of a standalone bot with no dev dependencies (but then again dialogue flow is just yet another connection to an api and this is where the beauty of Botpress really lies, seamless connectivity to all types of apis and crm tools).

So now because I am being constantly frustrated by nlu and whenever I mention it someone on the Botpress team gets a bruised ego, I am having to resort to


  "version": "0.0.1",
  "catchAll": {
    "onReceive": [],
    "next": [
      {
        "condition": "event.payload.text.toLowerCase() === 'hie'",
        "node": "Formal_Greeting"
      },
      {
        "condition": "event.payload.text.toLowerCase() === 'hello'",
        "node": "Formal_Greeting"
      },

/*There is a build up of about eighty of these (thank God I am a fast typist)

Which works for prototypes but burdens my team with having to find messy ways to connect with dialogflow since I am in charge of at least seven projects at a time. This in turn shoots open-source in the foot as the solutions are usually non-javascript so I cant really share it with the community.

And there you have it: The case for inclusivity. All I am saying is don’t shut out options that work while you are refining an option thats still buggy. Throw it in. We read changelogs. We are open-minded and once we learn of an improvement on any feature we try it out. If nlu,s behaviour becomes less eratic to an acceptable level, we will gladly embrace it.