Skip to content
Branch: master
Find file Copy path
Find file Copy path
JustinaPetr uploaded episodes 3810550 Nov 14, 2019
0 contributors

Users who have contributed to this file

30 lines (20 sloc) 940 Bytes
# This files contains your custom actions which can be used to run
# custom Python code.
# See this guide on how to implement these action:
# This is a simple example for a custom action which utters "Hello World!"
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from import SlotSet
class ActionFacilitySearch(Action):
def name(self) -> Text:
return "action_facility_search"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
facility = tracker.get_slot("facility_type")
address = "300 Hyde St, San Francisco"
dispatcher.utter_message("Here is the address of the {}:{}".format(facility, address))
return [SlotSet("address", address)]
You can’t perform that action at this time.