Hello,
My question is about correctly connecting two separate servers (using NLG and NLU endpoints) to Rasa X, for now in local mode, although I will eventually attempt it with docker-compose
.
So far, I have successfully managed this with Rasa Open Source (version 2.8.x).
Versions:
Rasa Version : 2.8.21
Minimum Compatible Version: 2.8.9
Rasa SDK Version : 2.8.3
Rasa X Version : 1.0.1
Python Version : 3.8.12
Operating System : Linux-5.4.0-94-generic-x86_64-with-glibc2.27
Context:
I am currently building a bilingual bot (think code-switching, not 2 separate monolingual bots with the same content).
I have trained:
- 1 language-agnostic core model (with Rasa)
- 2 language-specific NLU models (with Rasa)
- 1 small language identification model (custom)
I have implemented:
- An NLU server which
- identifies the language of the input with the language identification model,
- pass the message to the correct Rasa NLU model,
- and finally returns intent + detected language (as an entity)
- An NLG server which
- uses the detected language to pick the correct set of responses,
- then retrieve the individual response based on the action predicted by the core model
What works:
After starting my NLU/NLG servers (same port), it works as expected in Rasa Open Source with the endpoints:
nlg:
url: "http://localhost:6001/nlg"
nlu:
url: "http://localhost:6001"
and running:
rasa shell --model models/core-model-agnostic-v2.tar.gz --endpoints endpoints.yml
My NLG/NLU servers are called just fine:
[2022-01-17 15:42:53 +0100] - (sanic.access)[INFO][127.0.0.1:42304]: POST http://localhost:6001/model/parse 200 884
[2022-01-17 15:42:53 +0100] - (sanic.access)[INFO][127.0.0.1:42306]: POST http://localhost:6001/nlg 200 253
The problem:
However, I am not managing to achieve this when trying to do the same with Rasa X:
rasa x --endpoints endpoints.yml -d domain.yml --model models/core-model-agnostic-v2.tar.gz --config configs/config_core.yml
At this point, Rasa X starts okay, but:
- The NLU server is not contacted at all (no log visible for my server)
- The Core model works fine, but is useless without intents from the NLU side
- The NLG server is contacted, but is useless without sensible actions predicted (I haven’t implemented the fallback yet)
# Story from Rasa X Interactive Learning panel
- story: Story from Conversation ID 8a6ff9ff8c5847e1905db5ba76c6375f
steps:
- intent: Hello
- action: action_default_fallback
# NLG server works but is useless
# NLU server is not contacted at all
[2022-01-17 15:50:56 +0100] [212935] [WARNING] Could not find response `utter_default`
[2022-01-17 15:50:56 +0100] - (sanic.access)[INFO][127.0.0.1:42752]: POST http://localhost:6001/nlg 200 39
The TL;DR question:
How do I connect a custom NLU server to Rasa X?
Thank you for your help!