From 1168c2f474a272a59b9be5b9f935ce317876f96c Mon Sep 17 00:00:00 2001 From: melindaloubser1 Date: Tue, 8 Dec 2020 06:00:42 +0200 Subject: [PATCH 1/5] document connecting an NLU only server --- docs/docs/nlu-only.mdx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/docs/nlu-only.mdx b/docs/docs/nlu-only.mdx index 7f18aecc30d2..a9cb912ed5a5 100644 --- a/docs/docs/nlu-only.mdx +++ b/docs/docs/nlu-only.mdx @@ -51,3 +51,31 @@ To do this, run: ```bash curl localhost:5005/model/parse -d '{"text":"hello"}' ``` + +## Connecting to an NLU server + + +You can connect a Rasa dialogue management only server with a separately running NLU server +by adding the connection details to the dialogue management server's endpoint configuration file: + +```yaml-rasa title="endpoints.yml" +nlu: + url: "http://:" + token: # [optional] + token_name: # [optional] (default: token) +``` + +The `token` and `token_name` refer to optional [authentication paramenters](./http-api.mdx#token-based-auth). + +The dialogue management server should serve a model that does not include an NLU model. +To obtain a dialogue management only model, train a model with `rasa train core` or use +`rasa train` but exclude all NLU data. + +When the dialogue management server receives a message, it will [send a request](https://rasa.com/docs/rasa/pages/http-api#operation/parseModelMessage) to +`http://:/model/parse` and use the parsing information returned. + +Note that you should **not** use the same endpoint configuration file for the NLU server as for the dialogue management server, since +the `nlu` endpoint refers back to the NLU server itself. + +If you are implementing a custom NLU server (i.e. not Rasa NLU), your server should provide a `/model/parse` endpoint that responds to requests in the same +format as a Rasa NLU server does. From f057df8888db0bdee27c8ba856dccfe13d2894e9 Mon Sep 17 00:00:00 2001 From: Melinda Loubser <32034278+melindaloubser1@users.noreply.github.com> Date: Tue, 8 Dec 2020 11:44:42 +0200 Subject: [PATCH 2/5] Update docs/docs/nlu-only.mdx --- docs/docs/nlu-only.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/nlu-only.mdx b/docs/docs/nlu-only.mdx index a9cb912ed5a5..1afa718a5366 100644 --- a/docs/docs/nlu-only.mdx +++ b/docs/docs/nlu-only.mdx @@ -65,7 +65,7 @@ nlu: token_name: # [optional] (default: token) ``` -The `token` and `token_name` refer to optional [authentication paramenters](./http-api.mdx#token-based-auth). +The `token` and `token_name` refer to optional [authentication parameters](./http-api.mdx#token-based-auth). The dialogue management server should serve a model that does not include an NLU model. To obtain a dialogue management only model, train a model with `rasa train core` or use From 56b5856303cb507ae9f2a4ffe3569b12673d1775 Mon Sep 17 00:00:00 2001 From: melindaloubser1 Date: Wed, 13 Jan 2021 11:51:58 +0200 Subject: [PATCH 3/5] move nlu only server to separate page --- docs/docs/nlu-only-server.mdx | 36 +++++++++++++++++++++++++++++++++++ docs/docs/nlu-only.mdx | 28 --------------------------- docs/sidebars.js | 1 + 3 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 docs/docs/nlu-only-server.mdx diff --git a/docs/docs/nlu-only-server.mdx b/docs/docs/nlu-only-server.mdx new file mode 100644 index 000000000000..0b5fedca8c6c --- /dev/null +++ b/docs/docs/nlu-only-server.mdx @@ -0,0 +1,36 @@ +--- +id: nlu-only-server +sidebar_label: NLU Only Server +title: NLU Only Server +description: Read about connecting to a Rasa NLU only server using the HTTP API. +abstract: You can run an NLU only server and use the HTTP API to connect to it. +--- + + +## Connecting to an NLU server + +You can connect a [Rasa NLU-only server](./nlu-only.mdx#running-an-nlu-server) to a separately running Rasa dialogue management only server +by adding the connection details to the dialogue management server's endpoint configuration file: + +```yaml-rasa title="endpoints.yml" +nlu: + url: "http://:" + token: # [optional] + token_name: # [optional] (default: token) +``` + +The `token` and `token_name` refer to optional [authentication paramenters](./http-api.mdx#token-based-auth). + +The dialogue management server should serve a model that does not include an NLU model. +To obtain a dialogue management only model, train a model with `rasa train core` or use +`rasa train` but exclude all NLU data. + +When the dialogue management server receives a message, it will [send a request](https://rasa.com/docs/rasa/pages/http-api#operation/parseModelMessage) to +`http://:/model/parse` and use the parsing information returned. + +:::note endpoint configuration +The endpoint configuration for the dialogue management server will include an `nlu` endpoint that refers to your NLU only server. Therefore you should **use a separate endpoint configuration file** for the NLU server, excluding the `nlu` endpoint. +::: + +If you are implementing a custom NLU server (i.e. not Rasa NLU), your server should provide a `/model/parse` endpoint that responds to requests in the same +format as a Rasa NLU server does. diff --git a/docs/docs/nlu-only.mdx b/docs/docs/nlu-only.mdx index 1afa718a5366..7f18aecc30d2 100644 --- a/docs/docs/nlu-only.mdx +++ b/docs/docs/nlu-only.mdx @@ -51,31 +51,3 @@ To do this, run: ```bash curl localhost:5005/model/parse -d '{"text":"hello"}' ``` - -## Connecting to an NLU server - - -You can connect a Rasa dialogue management only server with a separately running NLU server -by adding the connection details to the dialogue management server's endpoint configuration file: - -```yaml-rasa title="endpoints.yml" -nlu: - url: "http://:" - token: # [optional] - token_name: # [optional] (default: token) -``` - -The `token` and `token_name` refer to optional [authentication parameters](./http-api.mdx#token-based-auth). - -The dialogue management server should serve a model that does not include an NLU model. -To obtain a dialogue management only model, train a model with `rasa train core` or use -`rasa train` but exclude all NLU data. - -When the dialogue management server receives a message, it will [send a request](https://rasa.com/docs/rasa/pages/http-api#operation/parseModelMessage) to -`http://:/model/parse` and use the parsing information returned. - -Note that you should **not** use the same endpoint configuration file for the NLU server as for the dialogue management server, since -the `nlu` endpoint refers back to the NLU server itself. - -If you are implementing a custom NLU server (i.e. not Rasa NLU), your server should provide a `/model/parse` endpoint that responds to requests in the same -format as a Rasa NLU server does. diff --git a/docs/sidebars.js b/docs/sidebars.js index a242baf73c15..0cfb0006d0bc 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -115,6 +115,7 @@ module.exports = { collapsed: true, items: [ 'http-api', + 'nlu-only-server' // 'jupyter-notebooks', ], }, From 28b1e647ed1d5ae7caab36e1f90f9b0f88fd7b90 Mon Sep 17 00:00:00 2001 From: Melinda Loubser <32034278+melindaloubser1@users.noreply.github.com> Date: Fri, 15 Jan 2021 16:28:13 +0200 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Ella Rohm-Ensing --- docs/docs/nlu-only-server.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/nlu-only-server.mdx b/docs/docs/nlu-only-server.mdx index 0b5fedca8c6c..bf88ba5cf7db 100644 --- a/docs/docs/nlu-only-server.mdx +++ b/docs/docs/nlu-only-server.mdx @@ -1,9 +1,9 @@ --- id: nlu-only-server -sidebar_label: NLU Only Server -title: NLU Only Server -description: Read about connecting to a Rasa NLU only server using the HTTP API. -abstract: You can run an NLU only server and use the HTTP API to connect to it. +sidebar_label: NLU-Only Server +title: NLU-Only Server +description: Read about connecting to a Rasa NLU-only server using the HTTP API. +abstract: You can run an NLU-only server and use the HTTP API to connect to it. --- From 967b3304d8cc74f36b3262b0660302bef4d5c3c8 Mon Sep 17 00:00:00 2001 From: melindaloubser1 Date: Tue, 26 Jan 2021 14:36:57 +0200 Subject: [PATCH 5/5] code block format --- docs/docs/nlu-only-server.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/nlu-only-server.mdx b/docs/docs/nlu-only-server.mdx index bf88ba5cf7db..77b21ec5ee4a 100644 --- a/docs/docs/nlu-only-server.mdx +++ b/docs/docs/nlu-only-server.mdx @@ -12,7 +12,7 @@ abstract: You can run an NLU-only server and use the HTTP API to connect to it. You can connect a [Rasa NLU-only server](./nlu-only.mdx#running-an-nlu-server) to a separately running Rasa dialogue management only server by adding the connection details to the dialogue management server's endpoint configuration file: -```yaml-rasa title="endpoints.yml" +```yaml title="endpoints.yml" nlu: url: "http://:" token: # [optional]