From fb3eb9831a12516ded65c4612f4cfc4f50c49ccf Mon Sep 17 00:00:00 2001 From: Tom Metcalfe Date: Tue, 23 Jul 2019 16:00:12 +0100 Subject: [PATCH 1/2] Add content menus to relevant pages, restructuring --- docs/core/actions.rst | 39 +++++++++++++++--------------- docs/core/domains.rst | 12 ++++++--- docs/core/interactive-learning.rst | 2 ++ docs/core/slots.rst | 6 +++++ docs/nlu/choosing-a-pipeline.rst | 16 +++++++----- docs/nlu/language-support.rst | 3 +++ docs/nlu/training-data-format.rst | 6 ++--- 7 files changed, 53 insertions(+), 31 deletions(-) diff --git a/docs/core/actions.rst b/docs/core/actions.rst index 889de3299c89..1789afdf8fd4 100644 --- a/docs/core/actions.rst +++ b/docs/core/actions.rst @@ -6,16 +6,17 @@ Actions ======= -.. contents:: - Actions are the things your bot runs in response to user input. There are three kinds of actions in Rasa Core: - 1. **Default actions**: e.g. ``action_listen``, ``action_restart``, - ``action_default_fallback`` - 2. **Utterance actions**: start with ``utter_``, just send a message + 1. **Utterance actions**: start with ``utter_``, just send a message to the user - 3. **Custom actions**: any other action, these actions can run arbitrary code + 2. **Custom actions**: any other action, these actions can run arbitrary code + 3. **Default actions**: e.g. ``action_listen``, ``action_restart``, + ``action_default_fallback`` + +.. contents:: + :local: Utterance Actions ----------------- @@ -66,7 +67,7 @@ other language and define your actions there - but we provide a small python SDK to make development there even easier. Custom Actions Written in Python --------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For actions written in python, we have a convenient SDK which starts this action server for you. @@ -144,6 +145,18 @@ There is an example of a ``SlotSet`` event :ref:`above `, and a full list of possible events in :ref:`Events `. +Execute Actions in Other Code +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Rasa Core will send an HTTP ``POST`` request to your server containing +information on which action to run. Furthermore, this request will contain all +information about the conversation. + +As a response to the action call from Core, you can modify the tracker, +e.g. by setting slots and send responses back to the user. +All of the modifications are done using events. +There is a list of all possible event types in :ref:`events`. + Default Actions --------------- @@ -195,15 +208,3 @@ to the list of actions in your domain: Rasa Core will then call your action endpoint and treat it as every other custom action. - -Execute Actions in Other Code ------------------------------ - -Rasa Core will send an HTTP ``POST`` request to your server containing -information on which action to run. Furthermore, this request will contain all -information about the conversation. - -As a response to the action call from Core, you can modify the tracker, -e.g. by setting slots and send responses back to the user. -All of the modifications are done using events. -There is a list of all possible event types in :ref:`events`. diff --git a/docs/core/domains.rst b/docs/core/domains.rst index ffe0515ae480..1225e944daa8 100644 --- a/docs/core/domains.rst +++ b/docs/core/domains.rst @@ -11,6 +11,12 @@ It specifies the ``intents``, ``entities``, ``slots``, and ``actions`` your bot should know about. Optionally, it can also include ``templates`` for the things your bot can say. +.. contents:: + :local: + + +An example of a Domain +---------------------- As an example, the ``DefaultDomain`` has the following yaml definition: @@ -51,7 +57,7 @@ For example, an action could: * just about anything! Custom Actions and Slots -^^^^^^^^^^^^^^^^^^^^^^^^ +------------------------ To reference slots in your domain, you need to reference them by their **module path**. To reference custom actions, use their **name**. @@ -76,7 +82,7 @@ see :ref:`custom-actions`). .. _utter_templates: Utterance templates -^^^^^^^^^^^^^^^^^^^ +------------------- Utterance templates are messages the bot will send back to the user. There are two ways to use these templates: @@ -270,7 +276,7 @@ multiple responses and Rasa will randomly pick one of them, e.g.: - text: "Hey, {name}. How is your day going?" Ignoring entities for certain intents -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +------------------------------------- If you want all entities to be ignored for certain intents, you can add the ``use_entities: []`` parameter to the intent in your domain diff --git a/docs/core/interactive-learning.rst b/docs/core/interactive-learning.rst index 616bdbdeb1c9..9b56ff2477c7 100644 --- a/docs/core/interactive-learning.rst +++ b/docs/core/interactive-learning.rst @@ -22,6 +22,8 @@ Some people call this `Software 2.0 `_ in the Rasa X docs. +.. contents:: + :local: Running Interactive Learning ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/core/slots.rst b/docs/core/slots.rst index 46d34c5b78fb..3741bacf88e2 100644 --- a/docs/core/slots.rst +++ b/docs/core/slots.rst @@ -7,6 +7,12 @@ Slots ===== +.. contents:: + :local: + +What are slots? +--------------- + **Slots are your bot's memory.** They act as a key-value store which can be used to store information the user provided (e.g their home city) as well as information gathered about the outside world (e.g. the result of a diff --git a/docs/nlu/choosing-a-pipeline.rst b/docs/nlu/choosing-a-pipeline.rst index 91c24e3ae689..43fe5909dbf6 100644 --- a/docs/nlu/choosing-a-pipeline.rst +++ b/docs/nlu/choosing-a-pipeline.rst @@ -10,6 +10,10 @@ Choosing a Pipeline Choosing an NLU pipeline allows you to customize your model and finetune it on your dataset. +.. contents:: + :local: + + The Short Answer ---------------- @@ -154,12 +158,12 @@ final context dictionary is used to persist the model's metadata. -Returned Entities Object ------------------------- -In the object returned after parsing there are two fields that show information -about how the pipeline impacted the entities returned. The ``extractor`` field -of an entity tells you which entity extractor found this particular entity. -The ``processors`` field contains the name of components that altered this +Reading an "entity" object +-------------------------- +After parsing, the entity is returned as a dictionary. There are two fields that show information +about how the pipeline impacted the entities returned: the ``extractor`` field +of an entity tells you which entity extractor found this particular entity, and +the ``processors`` field contains the name of components that altered this specific entity. The use of synonyms can also cause the ``value`` field not match the ``text`` diff --git a/docs/nlu/language-support.rst b/docs/nlu/language-support.rst index 1329648501a2..eeed4ebceabe 100644 --- a/docs/nlu/language-support.rst +++ b/docs/nlu/language-support.rst @@ -14,6 +14,9 @@ pipeline in :ref:`choosing-a-pipeline`. Other backends have some restrictions and support those languages which have pre-trained word vectors available. +.. contents:: + :local: + Training a model in any language using the ``supervised_embeddings`` pipeline ----------------------------------------------------------------------------- diff --git a/docs/nlu/training-data-format.rst b/docs/nlu/training-data-format.rst index b25d8660897c..000cf80321f1 100644 --- a/docs/nlu/training-data-format.rst +++ b/docs/nlu/training-data-format.rst @@ -6,12 +6,12 @@ Training Data Format ==================== -Data Format -~~~~~~~~~~~ - You can provide training data as Markdown or as JSON, as a single file or as a directory containing multiple files. Note that Markdown is usually easier to work with. +.. contents:: + :local: + Markdown Format --------------- From b0fb852b456dfdaab5e562de67a731f3f262d885 Mon Sep 17 00:00:00 2001 From: Tom Metcalfe Date: Wed, 24 Jul 2019 09:10:52 +0100 Subject: [PATCH 2/2] Edit entity object title --- docs/nlu/choosing-a-pipeline.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/nlu/choosing-a-pipeline.rst b/docs/nlu/choosing-a-pipeline.rst index 43fe5909dbf6..b79c26dcdcef 100644 --- a/docs/nlu/choosing-a-pipeline.rst +++ b/docs/nlu/choosing-a-pipeline.rst @@ -158,8 +158,8 @@ final context dictionary is used to persist the model's metadata. -Reading an "entity" object --------------------------- +The "entity" object explained +----------------------------- After parsing, the entity is returned as a dictionary. There are two fields that show information about how the pipeline impacted the entities returned: the ``extractor`` field of an entity tells you which entity extractor found this particular entity, and