From 1f90bfdb9aedff412be029adc3efdd0a7e481955 Mon Sep 17 00:00:00 2001 From: Varun Shankar S Date: Mon, 17 Jul 2023 09:24:46 +0200 Subject: [PATCH 1/6] Add default constants --- rasa/shared/core/constants.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rasa/shared/core/constants.py b/rasa/shared/core/constants.py index 06a5cdb83b02..b86fb1f93712 100644 --- a/rasa/shared/core/constants.py +++ b/rasa/shared/core/constants.py @@ -89,12 +89,14 @@ PREVIOUS_FLOW_SLOT = "rasa_previous_flow" CANCELLED_FLOW_SLOT = "rasa_cancelled_flow" CORRECTED_SLOTS_SLOT = "rasa_corrected_slots" +RETURN_VALUE_SLOT = "RETURN_VAL" FLOW_SLOT_NAMES = [ FLOW_STACK_SLOT, PREVIOUS_FLOW_SLOT, CANCELLED_FLOW_SLOT, CORRECTED_SLOTS_SLOT, + RETURN_VALUE_SLOT, ] # slots for knowledge base From 32bb49d61f23f47bddee6013b2f6072563ef44ef Mon Sep 17 00:00:00 2001 From: Varun Shankar S Date: Wed, 19 Jul 2023 09:35:55 +0200 Subject: [PATCH 2/6] fix naming --- rasa/shared/core/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rasa/shared/core/constants.py b/rasa/shared/core/constants.py index b86fb1f93712..aa4d14c262d6 100644 --- a/rasa/shared/core/constants.py +++ b/rasa/shared/core/constants.py @@ -89,7 +89,7 @@ PREVIOUS_FLOW_SLOT = "rasa_previous_flow" CANCELLED_FLOW_SLOT = "rasa_cancelled_flow" CORRECTED_SLOTS_SLOT = "rasa_corrected_slots" -RETURN_VALUE_SLOT = "RETURN_VAL" +RETURN_VALUE_SLOT = "return_value" FLOW_SLOT_NAMES = [ FLOW_STACK_SLOT, From 526af61347fd6ebd17b5f0524fe11fb1ec58f018 Mon Sep 17 00:00:00 2001 From: Varun Shankar S Date: Wed, 19 Jul 2023 09:48:38 +0200 Subject: [PATCH 3/6] fix tests --- tests/core/test_actions.py | 2 ++ tests/shared/importers/test_rasa.py | 2 ++ tests/test_server.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/core/test_actions.py b/tests/core/test_actions.py index de22be687c02..e1f3fd463f14 100644 --- a/tests/core/test_actions.py +++ b/tests/core/test_actions.py @@ -97,6 +97,7 @@ CANCELLED_FLOW_SLOT, PREVIOUS_FLOW_SLOT, CORRECTED_SLOTS_SLOT, + RETURN_VALUE_SLOT, ) from rasa.shared.core.trackers import DialogueStateTracker from rasa.shared.exceptions import RasaException @@ -315,6 +316,7 @@ async def test_remote_action_logs_events( CANCELLED_FLOW_SLOT: None, CORRECTED_SLOTS_SLOT: None, PREVIOUS_FLOW_SLOT: None, + RETURN_VALUE_SLOT: None, }, "events": [], "latest_input_channel": None, diff --git a/tests/shared/importers/test_rasa.py b/tests/shared/importers/test_rasa.py index 7c873cd3acc5..a141fc541965 100644 --- a/tests/shared/importers/test_rasa.py +++ b/tests/shared/importers/test_rasa.py @@ -16,6 +16,7 @@ PREVIOUS_FLOW_SLOT, CANCELLED_FLOW_SLOT, CORRECTED_SLOTS_SLOT, + RETURN_VALUE_SLOT, ) from rasa.shared.core.domain import Domain from rasa.shared.core.slots import AnySlot @@ -37,6 +38,7 @@ def test_rasa_file_importer(project: Text): AnySlot(PREVIOUS_FLOW_SLOT, mappings=[{}]), AnySlot(CANCELLED_FLOW_SLOT, mappings=[{}]), AnySlot(CORRECTED_SLOTS_SLOT, mappings=[{}]), + AnySlot(RETURN_VALUE_SLOT, mappings=[{}]), AnySlot(SESSION_START_METADATA_SLOT, mappings=[{}]), ] assert domain.entities == [] diff --git a/tests/test_server.py b/tests/test_server.py index ee7a76ffa98b..67efac66e8e7 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -57,6 +57,7 @@ CANCELLED_FLOW_SLOT, CORRECTED_SLOTS_SLOT, PREVIOUS_FLOW_SLOT, + RETURN_VALUE_SLOT, ) from rasa.shared.core.domain import Domain, SessionConfig from rasa.shared.core.events import ( @@ -1122,6 +1123,7 @@ async def test_requesting_non_existent_tracker(rasa_app: SanicASGITestClient): CANCELLED_FLOW_SLOT: None, CORRECTED_SLOTS_SLOT: None, PREVIOUS_FLOW_SLOT: None, + RETURN_VALUE_SLOT: None, } assert content["sender_id"] == "madeupid" assert content["events"] == [ From 4996f8774c51e0046d37cb9a62b39c96effcad48 Mon Sep 17 00:00:00 2001 From: Varun Shankar S Date: Sun, 23 Jul 2023 19:10:21 +0200 Subject: [PATCH 4/6] fix test --- data/test_trackers/tracker_moodbot.json | 1 + 1 file changed, 1 insertion(+) diff --git a/data/test_trackers/tracker_moodbot.json b/data/test_trackers/tracker_moodbot.json index 32dddd3f097b..190ec328dc65 100644 --- a/data/test_trackers/tracker_moodbot.json +++ b/data/test_trackers/tracker_moodbot.json @@ -39,6 +39,7 @@ "rasa_corrected_slots": null, "rasa_previous_flow": null, "requested_slot": null, + "return_value": null, "session_started_metadata": null }, "latest_input_channel": null, From 28e57de777aa83561bcac49caed36b2e0720ef41 Mon Sep 17 00:00:00 2001 From: Varun Shankar S Date: Sun, 23 Jul 2023 19:36:27 +0200 Subject: [PATCH 5/6] fix tests --- tests/shared/core/test_domain.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/shared/core/test_domain.py b/tests/shared/core/test_domain.py index 19393b61df05..6d2695835388 100644 --- a/tests/shared/core/test_domain.py +++ b/tests/shared/core/test_domain.py @@ -924,6 +924,7 @@ def test_domain_from_multiple_files(): "rasa_corrected_slots", "rasa_previous_flow", "requested_slot", + "return_value", "session_started_metadata", ] From c2c3cc5e965845ac15366d65afbe6ebc17345814 Mon Sep 17 00:00:00 2001 From: Varun Shankar S Date: Mon, 24 Jul 2023 08:43:06 +0200 Subject: [PATCH 6/6] fix tests --- tests/core/test_actions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/core/test_actions.py b/tests/core/test_actions.py index e1f3fd463f14..3c14df2ac38a 100644 --- a/tests/core/test_actions.py +++ b/tests/core/test_actions.py @@ -250,6 +250,7 @@ async def test_remote_action_runs( CANCELLED_FLOW_SLOT: None, CORRECTED_SLOTS_SLOT: None, PREVIOUS_FLOW_SLOT: None, + RETURN_VALUE_SLOT: None, }, "events": [], "latest_input_channel": None,