Response Selector under Rasa 2.4.0

Could you provide a new example for Response Selector for RASA 2.4.0?

I followed this issue:

Using the same components mentioned in that issue, I am able to run response selector using Rasa 1.10.1

However, the same code breaks under Rasa 2.4.0 with the following error.

Transport closed @ (‘127.0.0.1’, 35476) and exception experienced during error handling 2021-04-15 14:17:40 ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<RestInput.on_message_wrapper() done, defined at /home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/channels/rest.py:33> exception=IndexError(‘list index out of range’)> Traceback (most recent call last): File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/channels/rest.py”, line 47, in on_message_wrapper await on_new_message(message) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/channels/channel.py”, line 85, in handler await app.agent.handle_message(*args, **kwargs) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/agent.py”, line 528, in handle_message return await processor.handle_message(message) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/processor.py”, line 91, in handle_message tracker = await self.log_message(message, should_save_tracker=False) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/processor.py”, line 322, in log_message await self._handle_message_with_tracker(message, tracker) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/processor.py”, line 587, in _handle_message_with_tracker parse_data = await self.parse_message(message, tracker) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/processor.py”, line 566, in parse_message text, message.message_id, tracker, metadata=message.metadata File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/core/interpreter.py”, line 145, in parse result = self.interpreter.parse(text) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/nlu/model.py”, line 453, in parse component.process(message, **self.context) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/nlu/selectors/response_selector.py”, line 414, in process self._resolve_intent_response_key(top_label) or top_label[INTENT_NAME_KEY] File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/nlu/selectors/response_selector.py”, line 396, in _resolve_intent_response_key search_key = util.template_key_to_intent_response_key(key) File “/home/syu/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/shared/nlu/training_data/util.py”, line 145, in template_key_to_intent_response_key return template_key.split(UTTER_PREFIX)[1] IndexError: list index out of range

How to make the code work in Rasa 2.4.0? I notice that new demo has lots of actions call in actions.py. But the old version code works without defining any actions, is it still doable in new Rasa version?

Thanks!