From a95f26d8e47240d03b39077450eac2e8054dd1f2 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Mon, 25 Sep 2023 11:47:09 +0200 Subject: [PATCH 01/16] moved existing examples into subfolder --- .../actions => nlu_based}/__init__.py | 0 examples/{ => nlu_based}/concertbot/README.md | 0 .../concertbot}/actions/__init__.py | 0 .../concertbot/actions/actions.py | 0 .../{ => nlu_based}/concertbot/config.yml | 0 .../{ => nlu_based}/concertbot/data/nlu.yml | 0 .../{ => nlu_based}/concertbot/data/rules.yml | 0 .../concertbot/data/stories.yml | 0 .../{ => nlu_based}/concertbot/domain.yml | 0 .../{ => nlu_based}/concertbot/endpoints.yml | 0 examples/{ => nlu_based}/e2ebot/config.yml | 0 examples/{ => nlu_based}/e2ebot/data/nlu.yml | 0 .../{ => nlu_based}/e2ebot/data/stories.yml | 0 examples/{ => nlu_based}/e2ebot/domain.yml | 0 .../e2ebot/tests/test_stories.yml | 0 examples/{ => nlu_based}/formbot/README.md | 0 .../formbot}/actions/__init__.py | 0 .../formbot/actions/actions.py | 0 examples/{ => nlu_based}/formbot/config.yml | 0 examples/{ => nlu_based}/formbot/data/nlu.yml | 0 .../{ => nlu_based}/formbot/data/rules.yml | 0 .../{ => nlu_based}/formbot/data/stories.yml | 0 examples/{ => nlu_based}/formbot/domain.yml | 0 .../{ => nlu_based}/formbot/endpoints.yml | 0 .../formbot/tests/test_stories.yml | 0 .../knowledgebasebot/README.md | 0 .../knowledgebasebot}/actions/__init__.py | 0 .../knowledgebasebot/actions/actions.py | 0 .../knowledgebasebot/config.yml | 0 .../knowledgebasebot/data/nlu.yml | 0 .../knowledgebasebot/data/rules.yml | 0 .../knowledgebasebot/data/stories.yml | 0 .../knowledgebasebot/domain.yml | 0 .../knowledgebasebot/endpoints.yml | 0 .../knowledgebasebot/knowledge_base_data.json | 0 examples/{ => nlu_based}/moodbot/README.md | 0 examples/{ => nlu_based}/moodbot/config.yml | 0 .../{ => nlu_based}/moodbot/credentials.yml | 0 examples/{ => nlu_based}/moodbot/data/nlu.yml | 0 .../{ => nlu_based}/moodbot/data/rules.yml | 0 .../{ => nlu_based}/moodbot/data/stories.yml | 0 examples/{ => nlu_based}/moodbot/domain.yml | 0 .../{ => nlu_based}/reminderbot/README.md | 0 .../reminderbot}/actions/__init__.py | 0 .../reminderbot/actions/actions.py | 0 .../reminderbot/callback_server.py | 0 .../{ => nlu_based}/reminderbot/config.yml | 0 .../reminderbot/credentials.yml | 0 .../{ => nlu_based}/reminderbot/data/nlu.yml | 0 .../reminderbot/data/rules.yml | 0 .../reminderbot/data/stories.yml | 0 .../{ => nlu_based}/reminderbot/domain.yml | 0 .../{ => nlu_based}/reminderbot/endpoints.yml | 0 .../responseselectorbot/README.md | 0 .../responseselectorbot/config.yml | 0 .../responseselectorbot/data/nlu.yml | 0 .../responseselectorbot/data/rules.yml | 0 .../responseselectorbot/data/stories.yml | 0 .../responseselectorbot/domain.yml | 0 examples/nlu_based/rules/actions/__init__.py | 0 .../{ => nlu_based}/rules/actions/actions.py | 0 examples/{ => nlu_based}/rules/config.yml | 0 examples/{ => nlu_based}/rules/data/nlu.yml | 0 examples/{ => nlu_based}/rules/data/rules.yml | 0 examples/{ => nlu_based}/rules/domain.yml | 0 examples/{ => nlu_based}/rules/endpoints.yml | 0 .../test_example_bots_training_data.py | 30 +++++++++---------- 67 files changed, 15 insertions(+), 15 deletions(-) rename examples/{concertbot/actions => nlu_based}/__init__.py (100%) rename examples/{ => nlu_based}/concertbot/README.md (100%) rename examples/{formbot => nlu_based/concertbot}/actions/__init__.py (100%) rename examples/{ => nlu_based}/concertbot/actions/actions.py (100%) rename examples/{ => nlu_based}/concertbot/config.yml (100%) rename examples/{ => nlu_based}/concertbot/data/nlu.yml (100%) rename examples/{ => nlu_based}/concertbot/data/rules.yml (100%) rename examples/{ => nlu_based}/concertbot/data/stories.yml (100%) rename examples/{ => nlu_based}/concertbot/domain.yml (100%) rename examples/{ => nlu_based}/concertbot/endpoints.yml (100%) rename examples/{ => nlu_based}/e2ebot/config.yml (100%) rename examples/{ => nlu_based}/e2ebot/data/nlu.yml (100%) rename examples/{ => nlu_based}/e2ebot/data/stories.yml (100%) rename examples/{ => nlu_based}/e2ebot/domain.yml (100%) rename examples/{ => nlu_based}/e2ebot/tests/test_stories.yml (100%) rename examples/{ => nlu_based}/formbot/README.md (100%) rename examples/{knowledgebasebot => nlu_based/formbot}/actions/__init__.py (100%) rename examples/{ => nlu_based}/formbot/actions/actions.py (100%) rename examples/{ => nlu_based}/formbot/config.yml (100%) rename examples/{ => nlu_based}/formbot/data/nlu.yml (100%) rename examples/{ => nlu_based}/formbot/data/rules.yml (100%) rename examples/{ => nlu_based}/formbot/data/stories.yml (100%) rename examples/{ => nlu_based}/formbot/domain.yml (100%) rename examples/{ => nlu_based}/formbot/endpoints.yml (100%) rename examples/{ => nlu_based}/formbot/tests/test_stories.yml (100%) rename examples/{ => nlu_based}/knowledgebasebot/README.md (100%) rename examples/{reminderbot => nlu_based/knowledgebasebot}/actions/__init__.py (100%) rename examples/{ => nlu_based}/knowledgebasebot/actions/actions.py (100%) rename examples/{ => nlu_based}/knowledgebasebot/config.yml (100%) rename examples/{ => nlu_based}/knowledgebasebot/data/nlu.yml (100%) rename examples/{ => nlu_based}/knowledgebasebot/data/rules.yml (100%) rename examples/{ => nlu_based}/knowledgebasebot/data/stories.yml (100%) rename examples/{ => nlu_based}/knowledgebasebot/domain.yml (100%) rename examples/{ => nlu_based}/knowledgebasebot/endpoints.yml (100%) rename examples/{ => nlu_based}/knowledgebasebot/knowledge_base_data.json (100%) rename examples/{ => nlu_based}/moodbot/README.md (100%) rename examples/{ => nlu_based}/moodbot/config.yml (100%) rename examples/{ => nlu_based}/moodbot/credentials.yml (100%) rename examples/{ => nlu_based}/moodbot/data/nlu.yml (100%) rename examples/{ => nlu_based}/moodbot/data/rules.yml (100%) rename examples/{ => nlu_based}/moodbot/data/stories.yml (100%) rename examples/{ => nlu_based}/moodbot/domain.yml (100%) rename examples/{ => nlu_based}/reminderbot/README.md (100%) rename examples/{rules => nlu_based/reminderbot}/actions/__init__.py (100%) rename examples/{ => nlu_based}/reminderbot/actions/actions.py (100%) rename examples/{ => nlu_based}/reminderbot/callback_server.py (100%) rename examples/{ => nlu_based}/reminderbot/config.yml (100%) rename examples/{ => nlu_based}/reminderbot/credentials.yml (100%) rename examples/{ => nlu_based}/reminderbot/data/nlu.yml (100%) rename examples/{ => nlu_based}/reminderbot/data/rules.yml (100%) rename examples/{ => nlu_based}/reminderbot/data/stories.yml (100%) rename examples/{ => nlu_based}/reminderbot/domain.yml (100%) rename examples/{ => nlu_based}/reminderbot/endpoints.yml (100%) rename examples/{ => nlu_based}/responseselectorbot/README.md (100%) rename examples/{ => nlu_based}/responseselectorbot/config.yml (100%) rename examples/{ => nlu_based}/responseselectorbot/data/nlu.yml (100%) rename examples/{ => nlu_based}/responseselectorbot/data/rules.yml (100%) rename examples/{ => nlu_based}/responseselectorbot/data/stories.yml (100%) rename examples/{ => nlu_based}/responseselectorbot/domain.yml (100%) create mode 100644 examples/nlu_based/rules/actions/__init__.py rename examples/{ => nlu_based}/rules/actions/actions.py (100%) rename examples/{ => nlu_based}/rules/config.yml (100%) rename examples/{ => nlu_based}/rules/data/nlu.yml (100%) rename examples/{ => nlu_based}/rules/data/rules.yml (100%) rename examples/{ => nlu_based}/rules/domain.yml (100%) rename examples/{ => nlu_based}/rules/endpoints.yml (100%) diff --git a/examples/concertbot/actions/__init__.py b/examples/nlu_based/__init__.py similarity index 100% rename from examples/concertbot/actions/__init__.py rename to examples/nlu_based/__init__.py diff --git a/examples/concertbot/README.md b/examples/nlu_based/concertbot/README.md similarity index 100% rename from examples/concertbot/README.md rename to examples/nlu_based/concertbot/README.md diff --git a/examples/formbot/actions/__init__.py b/examples/nlu_based/concertbot/actions/__init__.py similarity index 100% rename from examples/formbot/actions/__init__.py rename to examples/nlu_based/concertbot/actions/__init__.py diff --git a/examples/concertbot/actions/actions.py b/examples/nlu_based/concertbot/actions/actions.py similarity index 100% rename from examples/concertbot/actions/actions.py rename to examples/nlu_based/concertbot/actions/actions.py diff --git a/examples/concertbot/config.yml b/examples/nlu_based/concertbot/config.yml similarity index 100% rename from examples/concertbot/config.yml rename to examples/nlu_based/concertbot/config.yml diff --git a/examples/concertbot/data/nlu.yml b/examples/nlu_based/concertbot/data/nlu.yml similarity index 100% rename from examples/concertbot/data/nlu.yml rename to examples/nlu_based/concertbot/data/nlu.yml diff --git a/examples/concertbot/data/rules.yml b/examples/nlu_based/concertbot/data/rules.yml similarity index 100% rename from examples/concertbot/data/rules.yml rename to examples/nlu_based/concertbot/data/rules.yml diff --git a/examples/concertbot/data/stories.yml b/examples/nlu_based/concertbot/data/stories.yml similarity index 100% rename from examples/concertbot/data/stories.yml rename to examples/nlu_based/concertbot/data/stories.yml diff --git a/examples/concertbot/domain.yml b/examples/nlu_based/concertbot/domain.yml similarity index 100% rename from examples/concertbot/domain.yml rename to examples/nlu_based/concertbot/domain.yml diff --git a/examples/concertbot/endpoints.yml b/examples/nlu_based/concertbot/endpoints.yml similarity index 100% rename from examples/concertbot/endpoints.yml rename to examples/nlu_based/concertbot/endpoints.yml diff --git a/examples/e2ebot/config.yml b/examples/nlu_based/e2ebot/config.yml similarity index 100% rename from examples/e2ebot/config.yml rename to examples/nlu_based/e2ebot/config.yml diff --git a/examples/e2ebot/data/nlu.yml b/examples/nlu_based/e2ebot/data/nlu.yml similarity index 100% rename from examples/e2ebot/data/nlu.yml rename to examples/nlu_based/e2ebot/data/nlu.yml diff --git a/examples/e2ebot/data/stories.yml b/examples/nlu_based/e2ebot/data/stories.yml similarity index 100% rename from examples/e2ebot/data/stories.yml rename to examples/nlu_based/e2ebot/data/stories.yml diff --git a/examples/e2ebot/domain.yml b/examples/nlu_based/e2ebot/domain.yml similarity index 100% rename from examples/e2ebot/domain.yml rename to examples/nlu_based/e2ebot/domain.yml diff --git a/examples/e2ebot/tests/test_stories.yml b/examples/nlu_based/e2ebot/tests/test_stories.yml similarity index 100% rename from examples/e2ebot/tests/test_stories.yml rename to examples/nlu_based/e2ebot/tests/test_stories.yml diff --git a/examples/formbot/README.md b/examples/nlu_based/formbot/README.md similarity index 100% rename from examples/formbot/README.md rename to examples/nlu_based/formbot/README.md diff --git a/examples/knowledgebasebot/actions/__init__.py b/examples/nlu_based/formbot/actions/__init__.py similarity index 100% rename from examples/knowledgebasebot/actions/__init__.py rename to examples/nlu_based/formbot/actions/__init__.py diff --git a/examples/formbot/actions/actions.py b/examples/nlu_based/formbot/actions/actions.py similarity index 100% rename from examples/formbot/actions/actions.py rename to examples/nlu_based/formbot/actions/actions.py diff --git a/examples/formbot/config.yml b/examples/nlu_based/formbot/config.yml similarity index 100% rename from examples/formbot/config.yml rename to examples/nlu_based/formbot/config.yml diff --git a/examples/formbot/data/nlu.yml b/examples/nlu_based/formbot/data/nlu.yml similarity index 100% rename from examples/formbot/data/nlu.yml rename to examples/nlu_based/formbot/data/nlu.yml diff --git a/examples/formbot/data/rules.yml b/examples/nlu_based/formbot/data/rules.yml similarity index 100% rename from examples/formbot/data/rules.yml rename to examples/nlu_based/formbot/data/rules.yml diff --git a/examples/formbot/data/stories.yml b/examples/nlu_based/formbot/data/stories.yml similarity index 100% rename from examples/formbot/data/stories.yml rename to examples/nlu_based/formbot/data/stories.yml diff --git a/examples/formbot/domain.yml b/examples/nlu_based/formbot/domain.yml similarity index 100% rename from examples/formbot/domain.yml rename to examples/nlu_based/formbot/domain.yml diff --git a/examples/formbot/endpoints.yml b/examples/nlu_based/formbot/endpoints.yml similarity index 100% rename from examples/formbot/endpoints.yml rename to examples/nlu_based/formbot/endpoints.yml diff --git a/examples/formbot/tests/test_stories.yml b/examples/nlu_based/formbot/tests/test_stories.yml similarity index 100% rename from examples/formbot/tests/test_stories.yml rename to examples/nlu_based/formbot/tests/test_stories.yml diff --git a/examples/knowledgebasebot/README.md b/examples/nlu_based/knowledgebasebot/README.md similarity index 100% rename from examples/knowledgebasebot/README.md rename to examples/nlu_based/knowledgebasebot/README.md diff --git a/examples/reminderbot/actions/__init__.py b/examples/nlu_based/knowledgebasebot/actions/__init__.py similarity index 100% rename from examples/reminderbot/actions/__init__.py rename to examples/nlu_based/knowledgebasebot/actions/__init__.py diff --git a/examples/knowledgebasebot/actions/actions.py b/examples/nlu_based/knowledgebasebot/actions/actions.py similarity index 100% rename from examples/knowledgebasebot/actions/actions.py rename to examples/nlu_based/knowledgebasebot/actions/actions.py diff --git a/examples/knowledgebasebot/config.yml b/examples/nlu_based/knowledgebasebot/config.yml similarity index 100% rename from examples/knowledgebasebot/config.yml rename to examples/nlu_based/knowledgebasebot/config.yml diff --git a/examples/knowledgebasebot/data/nlu.yml b/examples/nlu_based/knowledgebasebot/data/nlu.yml similarity index 100% rename from examples/knowledgebasebot/data/nlu.yml rename to examples/nlu_based/knowledgebasebot/data/nlu.yml diff --git a/examples/knowledgebasebot/data/rules.yml b/examples/nlu_based/knowledgebasebot/data/rules.yml similarity index 100% rename from examples/knowledgebasebot/data/rules.yml rename to examples/nlu_based/knowledgebasebot/data/rules.yml diff --git a/examples/knowledgebasebot/data/stories.yml b/examples/nlu_based/knowledgebasebot/data/stories.yml similarity index 100% rename from examples/knowledgebasebot/data/stories.yml rename to examples/nlu_based/knowledgebasebot/data/stories.yml diff --git a/examples/knowledgebasebot/domain.yml b/examples/nlu_based/knowledgebasebot/domain.yml similarity index 100% rename from examples/knowledgebasebot/domain.yml rename to examples/nlu_based/knowledgebasebot/domain.yml diff --git a/examples/knowledgebasebot/endpoints.yml b/examples/nlu_based/knowledgebasebot/endpoints.yml similarity index 100% rename from examples/knowledgebasebot/endpoints.yml rename to examples/nlu_based/knowledgebasebot/endpoints.yml diff --git a/examples/knowledgebasebot/knowledge_base_data.json b/examples/nlu_based/knowledgebasebot/knowledge_base_data.json similarity index 100% rename from examples/knowledgebasebot/knowledge_base_data.json rename to examples/nlu_based/knowledgebasebot/knowledge_base_data.json diff --git a/examples/moodbot/README.md b/examples/nlu_based/moodbot/README.md similarity index 100% rename from examples/moodbot/README.md rename to examples/nlu_based/moodbot/README.md diff --git a/examples/moodbot/config.yml b/examples/nlu_based/moodbot/config.yml similarity index 100% rename from examples/moodbot/config.yml rename to examples/nlu_based/moodbot/config.yml diff --git a/examples/moodbot/credentials.yml b/examples/nlu_based/moodbot/credentials.yml similarity index 100% rename from examples/moodbot/credentials.yml rename to examples/nlu_based/moodbot/credentials.yml diff --git a/examples/moodbot/data/nlu.yml b/examples/nlu_based/moodbot/data/nlu.yml similarity index 100% rename from examples/moodbot/data/nlu.yml rename to examples/nlu_based/moodbot/data/nlu.yml diff --git a/examples/moodbot/data/rules.yml b/examples/nlu_based/moodbot/data/rules.yml similarity index 100% rename from examples/moodbot/data/rules.yml rename to examples/nlu_based/moodbot/data/rules.yml diff --git a/examples/moodbot/data/stories.yml b/examples/nlu_based/moodbot/data/stories.yml similarity index 100% rename from examples/moodbot/data/stories.yml rename to examples/nlu_based/moodbot/data/stories.yml diff --git a/examples/moodbot/domain.yml b/examples/nlu_based/moodbot/domain.yml similarity index 100% rename from examples/moodbot/domain.yml rename to examples/nlu_based/moodbot/domain.yml diff --git a/examples/reminderbot/README.md b/examples/nlu_based/reminderbot/README.md similarity index 100% rename from examples/reminderbot/README.md rename to examples/nlu_based/reminderbot/README.md diff --git a/examples/rules/actions/__init__.py b/examples/nlu_based/reminderbot/actions/__init__.py similarity index 100% rename from examples/rules/actions/__init__.py rename to examples/nlu_based/reminderbot/actions/__init__.py diff --git a/examples/reminderbot/actions/actions.py b/examples/nlu_based/reminderbot/actions/actions.py similarity index 100% rename from examples/reminderbot/actions/actions.py rename to examples/nlu_based/reminderbot/actions/actions.py diff --git a/examples/reminderbot/callback_server.py b/examples/nlu_based/reminderbot/callback_server.py similarity index 100% rename from examples/reminderbot/callback_server.py rename to examples/nlu_based/reminderbot/callback_server.py diff --git a/examples/reminderbot/config.yml b/examples/nlu_based/reminderbot/config.yml similarity index 100% rename from examples/reminderbot/config.yml rename to examples/nlu_based/reminderbot/config.yml diff --git a/examples/reminderbot/credentials.yml b/examples/nlu_based/reminderbot/credentials.yml similarity index 100% rename from examples/reminderbot/credentials.yml rename to examples/nlu_based/reminderbot/credentials.yml diff --git a/examples/reminderbot/data/nlu.yml b/examples/nlu_based/reminderbot/data/nlu.yml similarity index 100% rename from examples/reminderbot/data/nlu.yml rename to examples/nlu_based/reminderbot/data/nlu.yml diff --git a/examples/reminderbot/data/rules.yml b/examples/nlu_based/reminderbot/data/rules.yml similarity index 100% rename from examples/reminderbot/data/rules.yml rename to examples/nlu_based/reminderbot/data/rules.yml diff --git a/examples/reminderbot/data/stories.yml b/examples/nlu_based/reminderbot/data/stories.yml similarity index 100% rename from examples/reminderbot/data/stories.yml rename to examples/nlu_based/reminderbot/data/stories.yml diff --git a/examples/reminderbot/domain.yml b/examples/nlu_based/reminderbot/domain.yml similarity index 100% rename from examples/reminderbot/domain.yml rename to examples/nlu_based/reminderbot/domain.yml diff --git a/examples/reminderbot/endpoints.yml b/examples/nlu_based/reminderbot/endpoints.yml similarity index 100% rename from examples/reminderbot/endpoints.yml rename to examples/nlu_based/reminderbot/endpoints.yml diff --git a/examples/responseselectorbot/README.md b/examples/nlu_based/responseselectorbot/README.md similarity index 100% rename from examples/responseselectorbot/README.md rename to examples/nlu_based/responseselectorbot/README.md diff --git a/examples/responseselectorbot/config.yml b/examples/nlu_based/responseselectorbot/config.yml similarity index 100% rename from examples/responseselectorbot/config.yml rename to examples/nlu_based/responseselectorbot/config.yml diff --git a/examples/responseselectorbot/data/nlu.yml b/examples/nlu_based/responseselectorbot/data/nlu.yml similarity index 100% rename from examples/responseselectorbot/data/nlu.yml rename to examples/nlu_based/responseselectorbot/data/nlu.yml diff --git a/examples/responseselectorbot/data/rules.yml b/examples/nlu_based/responseselectorbot/data/rules.yml similarity index 100% rename from examples/responseselectorbot/data/rules.yml rename to examples/nlu_based/responseselectorbot/data/rules.yml diff --git a/examples/responseselectorbot/data/stories.yml b/examples/nlu_based/responseselectorbot/data/stories.yml similarity index 100% rename from examples/responseselectorbot/data/stories.yml rename to examples/nlu_based/responseselectorbot/data/stories.yml diff --git a/examples/responseselectorbot/domain.yml b/examples/nlu_based/responseselectorbot/domain.yml similarity index 100% rename from examples/responseselectorbot/domain.yml rename to examples/nlu_based/responseselectorbot/domain.yml diff --git a/examples/nlu_based/rules/actions/__init__.py b/examples/nlu_based/rules/actions/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/examples/rules/actions/actions.py b/examples/nlu_based/rules/actions/actions.py similarity index 100% rename from examples/rules/actions/actions.py rename to examples/nlu_based/rules/actions/actions.py diff --git a/examples/rules/config.yml b/examples/nlu_based/rules/config.yml similarity index 100% rename from examples/rules/config.yml rename to examples/nlu_based/rules/config.yml diff --git a/examples/rules/data/nlu.yml b/examples/nlu_based/rules/data/nlu.yml similarity index 100% rename from examples/rules/data/nlu.yml rename to examples/nlu_based/rules/data/nlu.yml diff --git a/examples/rules/data/rules.yml b/examples/nlu_based/rules/data/rules.yml similarity index 100% rename from examples/rules/data/rules.yml rename to examples/nlu_based/rules/data/rules.yml diff --git a/examples/rules/domain.yml b/examples/nlu_based/rules/domain.yml similarity index 100% rename from examples/rules/domain.yml rename to examples/nlu_based/rules/domain.yml diff --git a/examples/rules/endpoints.yml b/examples/nlu_based/rules/endpoints.yml similarity index 100% rename from examples/rules/endpoints.yml rename to examples/nlu_based/rules/endpoints.yml diff --git a/tests/examples/test_example_bots_training_data.py b/tests/examples/test_example_bots_training_data.py index f5790582afb1..e77b7df48990 100644 --- a/tests/examples/test_example_bots_training_data.py +++ b/tests/examples/test_example_bots_training_data.py @@ -14,23 +14,23 @@ "config_file, domain_file, data_folder, raise_slot_warning, msg", [ ( - "examples/concertbot/config.yml", - "examples/concertbot/domain.yml", - "examples/concertbot/data", + "examples/nlu_based/concertbot/config.yml", + "examples/nlu_based/concertbot/domain.yml", + "examples/nlu_based/concertbot/data", True, None, ), ( - "examples/formbot/config.yml", - "examples/formbot/domain.yml", - "examples/formbot/data", + "examples/nlu_based/formbot/config.yml", + "examples/nlu_based/formbot/domain.yml", + "examples/nlu_based/formbot/data", True, None, ), ( - "examples/knowledgebasebot/config.yml", - "examples/knowledgebasebot/domain.yml", - "examples/knowledgebasebot/data", + "examples/nlu_based/knowledgebasebot/config.yml", + "examples/nlu_based/knowledgebasebot/domain.yml", + "examples/nlu_based/knowledgebasebot/data", True, "You are using an experimental feature: " "Action 'action_query_knowledge_base'!", @@ -43,16 +43,16 @@ None, ), ( - "examples/reminderbot/config.yml", - "examples/reminderbot/domain.yml", - "examples/reminderbot/data", + "examples/nlu_based/reminderbot/config.yml", + "examples/nlu_based/reminderbot/domain.yml", + "examples/nlu_based/reminderbot/data", True, None, ), ( - "examples/rules/config.yml", - "examples/rules/domain.yml", - "examples/rules/data", + "examples/nlu_based/rules/config.yml", + "examples/nlu_based/rules/domain.yml", + "examples/nlu_based/rules/data", True, None, ), From 40b41ee770c91bab211e489fdab35334b54fe84d Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Mon, 25 Sep 2023 11:57:28 +0200 Subject: [PATCH 02/16] use (completed) tutorial bot as example - wip --- examples/money_transfer/actions.py | 19 ++++++++ examples/money_transfer/config.yml | 13 ++++++ examples/money_transfer/data/flows.yml | 28 ++++++++++++ examples/money_transfer/domain.yml | 43 +++++++++++++++++++ .../e2e_tests/complete_request.yml | 7 +++ examples/money_transfer/endpoints.yml | 42 ++++++++++++++++++ 6 files changed, 152 insertions(+) create mode 100644 examples/money_transfer/actions.py create mode 100644 examples/money_transfer/config.yml create mode 100644 examples/money_transfer/data/flows.yml create mode 100644 examples/money_transfer/domain.yml create mode 100644 examples/money_transfer/e2e_tests/complete_request.yml create mode 100644 examples/money_transfer/endpoints.yml diff --git a/examples/money_transfer/actions.py b/examples/money_transfer/actions.py new file mode 100644 index 000000000000..6c515f02c1ee --- /dev/null +++ b/examples/money_transfer/actions.py @@ -0,0 +1,19 @@ +from typing import Any, Text, Dict, List +from rasa_sdk import Action, Tracker +from rasa_sdk.executor import CollectingDispatcher +from rasa_sdk.events import SlotSet + +class ActionSufficientFunds(Action): + def name(self) -> Text: + return "action_sufficient_funds" + + def run(self, dispatcher: CollectingDispatcher, + tracker: Tracker, + domain: Dict[Text, Any]) -> List[Dict[Text, Any]]: + balance = 1000 # hard-coded for tutorial purposes + # a real api call would look something like + # result = requests.get("https://example.com/api/balance") + # balance = result.json()["balance"] + transfer_amount = tracker.get_slot("amount") + has_sufficient_funds = transfer_amount <= balance + return [SlotSet("has_sufficient_funds", has_sufficient_funds)] diff --git a/examples/money_transfer/config.yml b/examples/money_transfer/config.yml new file mode 100644 index 000000000000..3801f4a2c879 --- /dev/null +++ b/examples/money_transfer/config.yml @@ -0,0 +1,13 @@ +recipe: default.v1 +language: en +pipeline: + - name: LLMCommandGenerator + llm: + model_name: gpt-4 + +policies: + - name: rasa.core.policies.flow_policy.FlowPolicy +# - name: rasa_plus.ml.DocsearchPolicy +# - name: RulePolicy + +assistant_id: 20230405-114328-tranquil-mustard diff --git a/examples/money_transfer/data/flows.yml b/examples/money_transfer/data/flows.yml new file mode 100644 index 000000000000..21f49a366167 --- /dev/null +++ b/examples/money_transfer/data/flows.yml @@ -0,0 +1,28 @@ +flows: + transfer_money: + description: This flow lets users send money to friends and family. + steps: + - id: "ask_recipient" + collect_information: recipient + next: "ask_amount" + - id: "ask_amount" + collect_information: amount + next: "check_funds" + - id: "check_funds" + action: action_sufficient_funds + next: + - if: has_sufficient_funds + then: "confirm_transfer" + - else: "insufficient_funds" + - id: "insufficient_funds" + action: utter_insufficient_funds + - id: "confirm_transfer" + collect_information: final_confirmation + next: + - if: final_confirmation + then: "transfer_successful" + - else: "transfer_cancelled" + - id: "transfer_cancelled" + action: utter_transfer_cancelled + - id: "transfer_successful" + action: utter_transfer_complete \ No newline at end of file diff --git a/examples/money_transfer/domain.yml b/examples/money_transfer/domain.yml new file mode 100644 index 000000000000..5cdd8dc3fe1c --- /dev/null +++ b/examples/money_transfer/domain.yml @@ -0,0 +1,43 @@ +version: "3.1" + +slots: + recipient: + type: text + mappings: + - type: custom + amount: + type: float + mappings: + - type: custom + final_confirmation: + type: bool + mappings: + - type: custom + has_sufficient_funds: + type: bool + mappings: + - type: custom + +responses: + utter_ask_recipient: + - text: "Who would you like to send money to?" + + utter_ask_amount: + - text: "How much money would you like to send?" + + utter_transfer_complete: + - text: "All done. ${amount} has been sent to {recipient}." + + utter_ask_final_confirmation: + - text: "Please confirm: you want to transfer ${amount} to {recipient}?" + + utter_transfer_cancelled: + - text: "Your transfer has been cancelled." + + utter_insufficient_funds: + - text: "You do not have enough funds to make this transaction." + + + +actions: + - action_sufficient_funds diff --git a/examples/money_transfer/e2e_tests/complete_request.yml b/examples/money_transfer/e2e_tests/complete_request.yml new file mode 100644 index 000000000000..99072cb957c9 --- /dev/null +++ b/examples/money_transfer/e2e_tests/complete_request.yml @@ -0,0 +1,7 @@ +test_cases: + - test_case: user corrects recipient in the next message + steps: + - user: I want to send 400 dollars to James + - utter: utter_ask_final_confirmation + - user: yes + - utter: utter_transfer_complete diff --git a/examples/money_transfer/endpoints.yml b/examples/money_transfer/endpoints.yml new file mode 100644 index 000000000000..5f65275b8802 --- /dev/null +++ b/examples/money_transfer/endpoints.yml @@ -0,0 +1,42 @@ +# This file contains the different endpoints your bot can use. + +# Server where the models are pulled from. +# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server + +#models: +# url: http://my-server.com/models/default_core@latest +# wait_time_between_pulls: 10 # [optional](default: 100) + +# Server which runs your custom actions. +# https://rasa.com/docs/rasa/custom-actions + +action_endpoint: + url: "http://localhost:5055/webhook" + +# Tracker store which is used to store the conversations. +# By default the conversations are stored in memory. +# https://rasa.com/docs/rasa/tracker-stores + +#tracker_store: +# type: redis +# url: +# port: +# db: +# password: +# use_ssl: + +#tracker_store: +# type: mongod +# url: +# db: +# username: +# password: + +# Event broker which all conversation events should be streamed to. +# https://rasa.com/docs/rasa/event-brokers + +#event_broker: +# url: localhost +# username: username +# password: password +# queue: queue From b7ad77dcc0a4340cfce4145af2ee797d80fae32a Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Mon, 25 Sep 2023 12:36:50 +0200 Subject: [PATCH 03/16] fix some paths --- tests/core/conftest.py | 8 ++++---- tests/core/policies/test_rule_policy.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/core/conftest.py b/tests/core/conftest.py index ff69c4acec19..1da3c380e10d 100644 --- a/tests/core/conftest.py +++ b/tests/core/conftest.py @@ -135,11 +135,11 @@ def default_tracker(domain: Domain) -> DialogueStateTracker: @pytest.fixture(scope="session") async def trained_formbot(trained_async: Callable) -> Text: return await trained_async( - domain="examples/formbot/domain.yml", - config="examples/formbot/config.yml", + domain="examples/nlu_based/formbot/domain.yml", + config="examples/nlu_based/formbot/config.yml", training_files=[ - "examples/formbot/data/rules.yml", - "examples/formbot/data/stories.yml", + "examples/nlu_based/formbot/data/rules.yml", + "examples/nlu_based/formbot/data/stories.yml", ], ) diff --git a/tests/core/policies/test_rule_policy.py b/tests/core/policies/test_rule_policy.py index 945a6717a826..9fa5cdee415c 100644 --- a/tests/core/policies/test_rule_policy.py +++ b/tests/core/policies/test_rule_policy.py @@ -758,7 +758,7 @@ def test_rule_policy_finetune( ) original_data = training.load_data( - "examples/rules/data/rules.yml", trained_rule_policy_domain + "examples/nlu_based/rules/data/rules.yml", trained_rule_policy_domain ) loaded_policy.train(original_data + [new_rule], trained_rule_policy_domain) @@ -805,7 +805,7 @@ def test_rule_policy_contradicting_rule_finetune( ) original_data = training.load_data( - "examples/rules/data/rules.yml", trained_rule_policy_domain + "examples/nlu_based/rules/data/rules.yml", trained_rule_policy_domain ) with pytest.raises(InvalidRule) as execinfo: @@ -1847,7 +1847,7 @@ def test_immediate_submit(policy: RulePolicy): @pytest.fixture() def trained_rule_policy_domain() -> Domain: - return Domain.load("examples/rules/domain.yml") + return Domain.load("examples/nlu_based/rules/domain.yml") @pytest.fixture() @@ -1855,7 +1855,7 @@ def trained_rule_policy( trained_rule_policy_domain: Domain, policy: RulePolicy ) -> RulePolicy: trackers = training.load_data( - "examples/rules/data/rules.yml", trained_rule_policy_domain + "examples/nlu_based/rules/data/rules.yml", trained_rule_policy_domain ) policy.train(trackers, trained_rule_policy_domain) From 708a65cee304f7827d38473052fa740369666ee4 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Mon, 25 Sep 2023 12:44:15 +0200 Subject: [PATCH 04/16] fix more paths --- tests/dialogues.py | 2 +- .../providers/test_domain_for_core_training_provider.py | 2 +- tests/graph_components/providers/test_rule_only_provider.py | 4 ++-- tests/shared/core/test_slot_mappings.py | 2 +- tests/test_validator.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/dialogues.py b/tests/dialogues.py index 412326cc3baf..d2deefb3559c 100644 --- a/tests/dialogues.py +++ b/tests/dialogues.py @@ -272,6 +272,6 @@ TEST_DOMAINS_FOR_DIALOGUES = [ "data/test_domains/default_with_slots.yml", - "examples/formbot/domain.yml", + "examples/nlu_based/formbot/domain.yml", "data/test_moodbot/domain.yml", ] diff --git a/tests/graph_components/providers/test_domain_for_core_training_provider.py b/tests/graph_components/providers/test_domain_for_core_training_provider.py index 52e5b7eecb32..0f08ab6b921a 100644 --- a/tests/graph_components/providers/test_domain_for_core_training_provider.py +++ b/tests/graph_components/providers/test_domain_for_core_training_provider.py @@ -98,7 +98,7 @@ def test_train_core_with_original_or_provided_domain_and_compare( default_execution_context: ExecutionContext, ): # Choose an example where the provider will remove a lot of information: - example = Path("examples/formbot/") + example = Path("examples/nlu_based/formbot/") training_files = [example / "data" / "rules.yml"] # Choose a configuration with a policy diff --git a/tests/graph_components/providers/test_rule_only_provider.py b/tests/graph_components/providers/test_rule_only_provider.py index 98100f36a85c..d778f0d62096 100644 --- a/tests/graph_components/providers/test_rule_only_provider.py +++ b/tests/graph_components/providers/test_rule_only_provider.py @@ -13,8 +13,8 @@ def test_provide( ): resource = Resource("some resource") - domain = Domain.load("examples/rules/domain.yml") - trackers = rasa.core.training.load_data("examples/rules/data/rules.yml", domain) + domain = Domain.load("examples/nlu_based/rules/domain.yml") + trackers = rasa.core.training.load_data("examples/nlu_based/rules/data/rules.yml", domain) policy = RulePolicy.create( RulePolicy.get_default_config(), diff --git a/tests/shared/core/test_slot_mappings.py b/tests/shared/core/test_slot_mappings.py index 7e67f388b102..152620a225da 100644 --- a/tests/shared/core/test_slot_mappings.py +++ b/tests/shared/core/test_slot_mappings.py @@ -28,7 +28,7 @@ def test_slot_mapping_entity_is_desired(slot_name: Text, expected: bool): def test_slot_mapping_intent_is_desired(domain: Domain): - domain = Domain.from_file("examples/formbot/domain.yml") + domain = Domain.from_file("examples/nlu_based/formbot/domain.yml") tracker = DialogueStateTracker("sender_id_test", slots=domain.slots) event1 = UserUttered( text="I'd like to book a restaurant for 2 people.", diff --git a/tests/test_validator.py b/tests/test_validator.py index d901d73fb333..1e7e93b9098c 100644 --- a/tests/test_validator.py +++ b/tests/test_validator.py @@ -347,7 +347,7 @@ def test_early_exit_on_invalid_domain(): def test_verify_there_is_not_example_repetition_in_intents(): importer = RasaFileImporter( domain_path="data/test_moodbot/domain.yml", - training_data_paths=["examples/knowledgebasebot/data/nlu.yml"], + training_data_paths=["examples/nlu_based/knowledgebasebot/data/nlu.yml"], ) validator = Validator.from_importer(importer) # force validator to not ignore warnings (default is True) From 62eb78a1648ceb1da7d53760909133db0690dfcc Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Mon, 25 Sep 2023 13:38:26 +0200 Subject: [PATCH 05/16] fix path --- docs/docs/domain.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/domain.mdx b/docs/docs/domain.mdx index 471768d440fd..512ef26de260 100644 --- a/docs/docs/domain.mdx +++ b/docs/docs/domain.mdx @@ -6,9 +6,9 @@ abstract: The domain defines the universe in which your assistant operates. It s --- Here is a full example of a domain, taken from the -[concertbot](https://github.com/RasaHQ/rasa/tree/main/examples/concertbot) example: +[concertbot](https://github.com/RasaHQ/rasa/tree/main/examples/nlu_based/concertbot) example: -```yaml-rasa (docs/sources/examples/concertbot/domain.yml) +```yaml-rasa (docs/sources/examples/nlu_based/concertbot/domain.yml) ``` ## Multiple Domain Files From feac44f4150e5ecd81579a5d8ef2c10af853a9cd Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Mon, 25 Sep 2023 13:42:45 +0200 Subject: [PATCH 06/16] split long line --- tests/graph_components/providers/test_rule_only_provider.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/graph_components/providers/test_rule_only_provider.py b/tests/graph_components/providers/test_rule_only_provider.py index d778f0d62096..3eba3f4fdf57 100644 --- a/tests/graph_components/providers/test_rule_only_provider.py +++ b/tests/graph_components/providers/test_rule_only_provider.py @@ -14,7 +14,10 @@ def test_provide( resource = Resource("some resource") domain = Domain.load("examples/nlu_based/rules/domain.yml") - trackers = rasa.core.training.load_data("examples/nlu_based/rules/data/rules.yml", domain) + trackers = rasa.core.training.load_data( + "examples/nlu_based/rules/data/rules.yml", + domain + ) policy = RulePolicy.create( RulePolicy.get_default_config(), From 22df05b0710ef21d3be3edd7a1d1ed024dc47c41 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Mon, 25 Sep 2023 14:49:58 +0200 Subject: [PATCH 07/16] black --- tests/graph_components/providers/test_rule_only_provider.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/graph_components/providers/test_rule_only_provider.py b/tests/graph_components/providers/test_rule_only_provider.py index 3eba3f4fdf57..19393fbf3ede 100644 --- a/tests/graph_components/providers/test_rule_only_provider.py +++ b/tests/graph_components/providers/test_rule_only_provider.py @@ -15,8 +15,7 @@ def test_provide( domain = Domain.load("examples/nlu_based/rules/domain.yml") trackers = rasa.core.training.load_data( - "examples/nlu_based/rules/data/rules.yml", - domain + "examples/nlu_based/rules/data/rules.yml", domain ) policy = RulePolicy.create( From a036662ee31fa06790d720ed668bed18236b2771 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Mon, 25 Sep 2023 15:31:41 +0200 Subject: [PATCH 08/16] fix link --- docs/docs/reaching-out-to-user.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs/reaching-out-to-user.mdx b/docs/docs/reaching-out-to-user.mdx index 66dfe1627f13..79e14e7e980b 100644 --- a/docs/docs/reaching-out-to-user.mdx +++ b/docs/docs/reaching-out-to-user.mdx @@ -62,7 +62,7 @@ Sometimes you want an external device to change the course of an ongoing convers For example, if you have a moisture-sensor attached to a Raspberry Pi, you could use it to notify you when a plant needs watering via your assistant. -The examples below are from the [reminderbot example bot](https://github.com/RasaHQ/rasa/blob/main/examples/reminderbot), +The examples below are from the [reminderbot example bot](https://github.com/RasaHQ/rasa/blob/main/examples/nlu_based/reminderbot), which includes both reminders and external events. ### 1. Trigger an Intent @@ -90,7 +90,7 @@ In a real-life scenario, your external device would get the conversation ID from In the dry plant example, you might have a database of plants, the users that water them, and the users' conversation IDs. Your Raspberry Pi would get the conversation ID directly from the database. To try out the reminderbot example locally, you'll need to get the conversation ID manually. See -the reminderbot [README](https://github.com/RasaHQ/rasa/blob/main/examples/reminderbot) for more information. +the reminderbot [README](https://github.com/RasaHQ/rasa/blob/main/examples/nlu_based/reminderbot) for more information. ### 3. Add NLU Training Data @@ -159,7 +159,7 @@ External Events and Reminders don't work in request-response channels like the ` Custom connectors for assistants implementing reminders or external events should be built off of the [CallbackInput channel](./connectors/your-own-website.mdx#callbackinput) instead of the RestInput channel. -See the [reminderbot README](https://github.com/RasaHQ/rasa/blob/main/examples/reminderbot/README.md) +See the [reminderbot README](https://github.com/RasaHQ/rasa/blob/main/examples/nlu_based/reminderbot/README.md) for instructions on how to test your reminders locally. ::: @@ -180,7 +180,7 @@ You should see the bot respond in your channel: ## Reminders You can have your assistant reach out to the user after a set amount of time by using [Reminders](./action-server/events.mdx#reminder). -The examples below are from the [reminderbot example bot](https://github.com/RasaHQ/rasa/blob/main/examples/reminderbot). +The examples below are from the [reminderbot example bot](https://github.com/RasaHQ/rasa/blob/main/examples/nlu_based/reminderbot). You can clone it and follow the instructions in `README` to try out the full version. ### Scheduling Reminders @@ -432,7 +432,7 @@ intents: To try out reminders you'll need to start a [CallbackChannel](./connectors/your-own-website.mdx#callbackinput). You'll also need to start the action server to schedule, react to, and cancel your reminders. -See the [reminderbot README](https://github.com/RasaHQ/rasa/blob/main/examples/reminderbot) for details. +See the [reminderbot README](https://github.com/RasaHQ/rasa/blob/main/examples/nlu_based/reminderbot) for details. Then, if you send the bot a message like `Remind me to call Paul Pots`, you should get a reminder back five minutes later that says `Remember to call Paul Pots!`. From abb3079c7a965a62cb6ed8386ae4225b4ccb7212 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Wed, 27 Sep 2023 14:10:11 +0200 Subject: [PATCH 09/16] update tutorial project template with new flows fmt --- rasa/cli/project_templates/tutorial/data/flows.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/rasa/cli/project_templates/tutorial/data/flows.yml b/rasa/cli/project_templates/tutorial/data/flows.yml index 040a96b776f1..d849432a00e6 100644 --- a/rasa/cli/project_templates/tutorial/data/flows.yml +++ b/rasa/cli/project_templates/tutorial/data/flows.yml @@ -2,11 +2,6 @@ flows: transfer_money: description: This flow lets users send money to friends and family. steps: - - id: "ask_recipient" - collect: recipient - next: "ask_amount" - - id: "ask_amount" - collect: amount - next: "transfer_successful" - - id: "transfer_successful" - action: utter_transfer_complete + - collect: recipient + - collect: amount + - action: utter_transfer_complete From 2839f88e20e6607d966ee1ee856f0befb3a63121 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Wed, 27 Sep 2023 14:10:34 +0200 Subject: [PATCH 10/16] tutorial template domain file - remove unneeded slot mappings --- rasa/cli/project_templates/tutorial/domain.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rasa/cli/project_templates/tutorial/domain.yml b/rasa/cli/project_templates/tutorial/domain.yml index dc2854563712..4c04450e3094 100644 --- a/rasa/cli/project_templates/tutorial/domain.yml +++ b/rasa/cli/project_templates/tutorial/domain.yml @@ -3,12 +3,8 @@ version: "3.1" slots: recipient: type: text - mappings: - - type: custom amount: type: float - mappings: - - type: custom responses: utter_ask_recipient: From 315153e8d488a3a0580b5be329b62a982e40d666 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Wed, 27 Sep 2023 17:19:40 +0200 Subject: [PATCH 11/16] example up to date with new flow format --- examples/money_transfer/actions.py | 4 +-- examples/money_transfer/data/flows.yml | 37 +++++++++++--------------- examples/money_transfer/domain.yml | 2 +- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/examples/money_transfer/actions.py b/examples/money_transfer/actions.py index 6c515f02c1ee..508083283686 100644 --- a/examples/money_transfer/actions.py +++ b/examples/money_transfer/actions.py @@ -3,9 +3,9 @@ from rasa_sdk.executor import CollectingDispatcher from rasa_sdk.events import SlotSet -class ActionSufficientFunds(Action): +class ActionCheckSufficientFunds(Action): def name(self) -> Text: - return "action_sufficient_funds" + return "action_check_sufficient_funds" def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, diff --git a/examples/money_transfer/data/flows.yml b/examples/money_transfer/data/flows.yml index 21f49a366167..07049a33f442 100644 --- a/examples/money_transfer/data/flows.yml +++ b/examples/money_transfer/data/flows.yml @@ -2,27 +2,22 @@ flows: transfer_money: description: This flow lets users send money to friends and family. steps: - - id: "ask_recipient" - collect_information: recipient - next: "ask_amount" - - id: "ask_amount" - collect_information: amount - next: "check_funds" - - id: "check_funds" - action: action_sufficient_funds + - collect: recipient + - collect: amount + - action: action_check_sufficient_funds next: - - if: has_sufficient_funds - then: "confirm_transfer" - - else: "insufficient_funds" - - id: "insufficient_funds" - action: utter_insufficient_funds - - id: "confirm_transfer" - collect_information: final_confirmation + - if: not has_sufficient_funds + then: + - action: utter_insufficient_funds + next: END + - else: final_confirmation + - id: final_confirmation + collect: final_confirmation next: - - if: final_confirmation - then: "transfer_successful" - - else: "transfer_cancelled" - - id: "transfer_cancelled" - action: utter_transfer_cancelled - - id: "transfer_successful" + - if: not final_confirmation + then: + - action: utter_transfer_cancelled + next: END + - else: transfer_successful + - id: transfer_successful action: utter_transfer_complete \ No newline at end of file diff --git a/examples/money_transfer/domain.yml b/examples/money_transfer/domain.yml index 5cdd8dc3fe1c..6d2cd6f1304c 100644 --- a/examples/money_transfer/domain.yml +++ b/examples/money_transfer/domain.yml @@ -40,4 +40,4 @@ responses: actions: - - action_sufficient_funds + - action_check_sufficient_funds From 9eeeceb7857089bd8cd1eaea5b05252f686a4635 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Wed, 27 Sep 2023 17:26:23 +0200 Subject: [PATCH 12/16] Revert "tutorial template domain file - remove unneeded slot mappings" This reverts commit 2839f88e20e6607d966ee1ee856f0befb3a63121. --- rasa/cli/project_templates/tutorial/domain.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rasa/cli/project_templates/tutorial/domain.yml b/rasa/cli/project_templates/tutorial/domain.yml index 4c04450e3094..dc2854563712 100644 --- a/rasa/cli/project_templates/tutorial/domain.yml +++ b/rasa/cli/project_templates/tutorial/domain.yml @@ -3,8 +3,12 @@ version: "3.1" slots: recipient: type: text + mappings: + - type: custom amount: type: float + mappings: + - type: custom responses: utter_ask_recipient: From 5d31cfea8cc697d68eb7eb6fe06efcfd33a7f2ed Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Thu, 28 Sep 2023 13:41:59 +0200 Subject: [PATCH 13/16] Update examples/money_transfer/data/flows.yml Co-authored-by: Maxime Vdb --- examples/money_transfer/data/flows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/money_transfer/data/flows.yml b/examples/money_transfer/data/flows.yml index 07049a33f442..76ecae6e6e5d 100644 --- a/examples/money_transfer/data/flows.yml +++ b/examples/money_transfer/data/flows.yml @@ -20,4 +20,4 @@ flows: next: END - else: transfer_successful - id: transfer_successful - action: utter_transfer_complete \ No newline at end of file + action: utter_transfer_complete From 966aba452c359e83b9486dd7e25ea42913d59e51 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Thu, 28 Sep 2023 13:46:33 +0200 Subject: [PATCH 14/16] temp fix ignoring url --- docs/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index 2361812f890d..14f821bb1e87 100644 --- a/docs/package.json +++ b/docs/package.json @@ -115,7 +115,8 @@ "\\.prototyping\\.rasa\\.com", "^https://github\\.com/mit-nlp/MITIE/releases/download/v0\\.4/MITIE-models-v0\\.2\\.tar\\.bz2$", "^https://forum.rasa.com/t/rasa-open-source-2-0-is-out-now-internal-draft/35577$", - "https://docs-test-001.openai.azure.com" + "https://docs-test-001.openai.azure.com", + "^https://github.com/RasaHQ/rasa/tree/main/examples/*" // FIXME ENG-580 ] } ] From d1d5c0e211ef32c0dbffc09bdc6d55245bf506ad Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Tue, 17 Oct 2023 13:26:47 -0400 Subject: [PATCH 15/16] remove comment breaking json --- docs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index 14f821bb1e87..1b875da3225b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -116,7 +116,7 @@ "^https://github\\.com/mit-nlp/MITIE/releases/download/v0\\.4/MITIE-models-v0\\.2\\.tar\\.bz2$", "^https://forum.rasa.com/t/rasa-open-source-2-0-is-out-now-internal-draft/35577$", "https://docs-test-001.openai.azure.com", - "^https://github.com/RasaHQ/rasa/tree/main/examples/*" // FIXME ENG-580 + "^https://github.com/RasaHQ/rasa/tree/main/examples/*" ] } ] From 3b4dbe965b374fad6c27488a5aa6867182960aa5 Mon Sep 17 00:00:00 2001 From: Alan Nichol Date: Tue, 17 Oct 2023 13:58:03 -0400 Subject: [PATCH 16/16] fix urls --- docs/docs/action-server/knowledge-base-actions.mdx | 2 +- docs/package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs/action-server/knowledge-base-actions.mdx b/docs/docs/action-server/knowledge-base-actions.mdx index 538c79cdfdfc..956c854fe993 100644 --- a/docs/docs/action-server/knowledge-base-actions.mdx +++ b/docs/docs/action-server/knowledge-base-actions.mdx @@ -563,7 +563,7 @@ You can customize your `InMemoryKnowledgeBase` by overwriting the following func You can overwrite it by calling the function `set_ordinal_mention_mapping()`. If you want to learn more about how this mapping is used, check out [Resolve Mentions](./knowledge-base-actions.mdx#resolve-mentions). -See the [example bot](https://github.com/RasaHQ/rasa/blob/main/examples/knowledgebasebot/actions/actions.py) for an +See the [example bot](https://github.com/RasaHQ/rasa/blob/main/examples/nlu_based/knowledgebasebot/actions/actions.py) for an example implementation of an `InMemoryKnowledgeBase` that uses the method `set_representation_function_of_object()` to overwrite the default representation of the object type “hotel.” The implementation of the `InMemoryKnowledgeBase` itself can be found in the diff --git a/docs/package.json b/docs/package.json index 1b875da3225b..8c1d8c01bf4c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -116,7 +116,8 @@ "^https://github\\.com/mit-nlp/MITIE/releases/download/v0\\.4/MITIE-models-v0\\.2\\.tar\\.bz2$", "^https://forum.rasa.com/t/rasa-open-source-2-0-is-out-now-internal-draft/35577$", "https://docs-test-001.openai.azure.com", - "^https://github.com/RasaHQ/rasa/tree/main/examples/*" + "^https://github.com/RasaHQ/rasa/tree/main/examples/*", + "^https://github.com/RasaHQ/rasa/blob/main/examples/*" ] } ]