How to run my own language server - Botpress v12

I would like to keep everything on premise, and till previous version no single dependency was there, but since I downloaded the last version every time I am getting an error:
“Language server is unreachable, bot wont work properly. Check the documentation to learn how to run your own language server”

But unfortunately, no documentation found for the same.

Any help would be appreciated.

Found it!

For anyone who is facing the same, you should start the built in language server separately by ./bp lang command and then change the configuration file of nlu (nlu.json) located in /data/global/config, value of endpoint of language sources should be “http://localhost:3100” and restart botpress server.

Then from server configuration, language tab you can download the desired language.

1 Like

Depending if you want to run it on a dev or production environment, make sure you check the available options (you will want to set authorization and rateLimiting)

Further more, by default language server uses languages models with 300 dimensions embeddings which might end up using a big part of you memory. Botpress offers a smaller (with degraded performances) versions of languages as well. just use the --dim=100 option.

I have tried your solution, but I still can’t access the Languages tab, I have an error “Request failed with status code 500”. Any idea how to fix that ?

That’s been fixed, sorry about that

Hello, I’m experiencing same error - “Request failed with code 500”. Any idea how to fix that?

Thank you for any help.

If you followed my steps mentioned earlier and downloaded the desired language and activate it, then restart the language server keeping your internet connection till you confirm that everything is fine and working then you just ignore it.

This message I believe botpress team needs to work on it, while it is still needs internet connection to show available online languages and your locally deployed languages, even when you started your language server after it is loading all downloaded languages it keeps trying to connect to internet.

But as I mentioned, this error is not affecting nlu module.

Regards

Hi @ammargaffar,

We worked on a fix for that. It will be available in the next release (12.1.0) coming this week. We now have a --offline flag that you can pass to your lang server. Also, theres no need to copy the metadata file anymore.

You can take a look at the changes: https://github.com/botpress/botpress/pull/2199 and the docs: https://github.com/botpress/botpress/pull/2202/files.

1 Like

Hi @rndlaine,

Thanks for your feedback, and it would be better if I have an option to download everything in one pc and just move it to production, currently the language files are downloaded in AppData folder which will be in a different path based on the machine, and I can’t see any configuration file to identify the path of language files.

Regards

The path can be changed with a config. The languages will be downloaded to the path specified by --langDir, by default its AppData. You can just copy the files over to the production machine or you could also start the production machine in online mode, download the models then restart in offline mode.

Hope this helps

Hello @rndlaine,

I want to run my language server as I’m behind a proxy and can’t access Internet. But when I run it I get a 407 error… Any idea why ?

Here is the message I get :

Also I have a “Cannot GET /” message on localhost:3100

Thanks for your help