Skip to content

Using Rasa UI as Middleware

Paul Aschmann edited this page Mar 9, 2018 · 6 revisions

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

As mentioned in the readme, instead of calling Rasa NLU directly e.g. http://localhost:5000/parse?q=hello%20there rather call: http://localhost:5001/api/v2/rasa/parse?q=hello%20there

In order to use Rasa UI in this scenario, you would need to first get a Authorization token by following the steps:

  1. Open Rasa UI and the agent, take note of the Agent name, and the secret key
  2. Use a tool like postman to do a POST to: http://localhost:5001/api/v2/authclient with x-www-form-urlencoded agent_name: Agent Name, and client_secret_key: xxx as your body. This should return a bearer token.
  3. Include this token with all subsequent calls to the parse URL as a Authorization header (e.g. Bearer oi1u290us9218)
Clone this wiki locally