I’d like to call an external api each time I receive new information from a user. The idea beging that the api is called and provided the latest entity/slot information and updates a database.
I currently have an action (
action_check_info) that is called according to the story and updates the infromation that I need it to. I want this to be called every time new information is received rather than controlled by a particular action.
class ActionCheckInfo(Action): def name(self) -> Text: return "action_check_info" def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List[Dict[Text, Any]]: info_to_check = tracker.slots['info'] info_dict = infocheck.check_info(info_to_check) return [SlotSet("info_converted", str(info_dict))]