Skip to content

Using Rasa UI as Middleware

Paul Aschmann edited this page Nov 5, 2019 · 6 revisions

Using Rasa UI as a middleware layer to call the Rasa NLU server can provide some benefits, like logging and metrics.

Instead of calling Rasa NLU directly e.g. http://rasa_server:5000/status call: http://localhost:5001/api/v2/rasa/status - this will forward the requests to the Rasa backend, and subsequently return the results.

Currently Rasa UI forwards these requests:

/rasa/status (e.g. use http://localhost:5001/api/v2/rasa/status) /rasa/url /rasa/version /rasa/model/train /rasa/model /rasa/model /rasa/model/parse /rasa/conversations/messages /rasa/restart /rasa/story /rasa/conversations/execute

Example request using Node.js + Request:

var request = require("request");

var options = { method: 'POST',
  url: 'http://localhost:5001/api/v2/rasa/model/parse',
  body: {text: 'Hello'},
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);
  console.log(body);
});
Clone this wiki locally