[507a54]: / production / action-server / actions / slot_reset.py

Download this file

17 lines (11 with data), 442 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.events import SlotSet
from rasa_sdk.executor import CollectingDispatcher
class SlotReset(Action):
def name(self) -> Text:
return "slot_reset"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
return [SlotSet("entity_name", None)]