From c423d683c70e70ea9068fae096fabd90b882d831 Mon Sep 17 00:00:00 2001 From: vcidst Date: Fri, 19 Jan 2024 11:40:40 +0100 Subject: [PATCH] fix the structure of dict --- tests/core/test_processor.py | 58 +++++++++++++++++------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/tests/core/test_processor.py b/tests/core/test_processor.py index 41ee58c70a08..d0581b1800ef 100644 --- a/tests/core/test_processor.py +++ b/tests/core/test_processor.py @@ -1943,46 +1943,44 @@ async def test_update_full_retrieval_intent( "intent": {"name": "chitchat", "confidence": 0.9}, "entities": [], "response_selector": { - { - "all_retrieval_intents": ["faq", "chitchat"], - "faq": { - "response": { - "responses": [{"text": "Our return policy lasts 30 days."}], + "all_retrieval_intents": ["faq", "chitchat"], + "faq": { + "response": { + "responses": [{"text": "Our return policy lasts 30 days."}], + "confidence": 1.0, + "intent_response_key": "faq/what_is_return_policy", + "utter_action": "utter_faq/what_is_return_policy", + }, + "ranking": [ + { "confidence": 1.0, "intent_response_key": "faq/what_is_return_policy", - "utter_action": "utter_faq/what_is_return_policy", }, - "ranking": [ - { - "confidence": 1.0, - "intent_response_key": "faq/what_is_return_policy", - }, + { + "confidence": 2.3378809862799945e-19, + "intent_response_key": "faq/how_can_i_track_my_order", + }, + ], + }, + "chitchat": { + "response": { + "responses": [ { - "confidence": 2.3378809862799945e-19, - "intent_response_key": "faq/how_can_i_track_my_order", + "text": "The sun is out today! Isn't that great?", }, ], + "confidence": 1.0, + "intent_response_key": "chitchat/ask_weather", + "utter_action": "utter_chitchat/ask_weather", }, - "chitchat": { - "response": { - "responses": [ - { - "text": "The sun is out today! Isn't that great?", - }, - ], + "ranking": [ + { "confidence": 1.0, "intent_response_key": "chitchat/ask_weather", - "utter_action": "utter_chitchat/ask_weather", }, - "ranking": [ - { - "confidence": 1.0, - "intent_response_key": "chitchat/ask_weather", - }, - {"confidence": 0.0, "intent_response_key": "chitchat/ask_name"}, - ], - }, - } + {"confidence": 0.0, "intent_response_key": "chitchat/ask_name"}, + ], + }, }, }