The problem is that It have to send something back and that is the time.
this is my code in my custom actions:
class actionshowtime(Action):
def name(self) -> Text:
return "action_show_time"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
current_place = next(tracker.get_latest_entity_values("place"), None)
utc = arrow.utcnow()
if not current_place:
msg = f"it's {utc.format('HH:mm')} utc now. You can also gice me a place."
dispatcher.utter_message(text=msg)
return []
tz_string = city_db.get(current_place, None)
if not tz_string:
msg = f"it's i didn't recognize {current_place}. can you say it aging?"
dispatcher.utter_message(text=msg)
return []
msg = f"it's {utc.to(city_db[current_place]).format('HH:mm')} in {current_place} now."
dispatcher.utter_message(text=msg)
return []
If it doesnât work when running it locally then I would suggest checking your domain.yml and nlu.yml. Could you paste part of these files here, please?
Ok, I am not sure if this could affect but please change the name of the class following the Camelcase rule. Second, add a print statement inside the class run function and check if your actions are accessed.
hi thanks, i am working on it right now. when I try to train the model I get this error: Core training was skipped because no valid domain file was found. Only an NLU-model was created. Please specify a valid domain using the ââdomainâ argument or check
if the provided domain file exists.
how can I fix this because if have a domain.yml domain.yml (2.3 KB)
I have come up with this error too but I donât remember I did something special to solve it. By checking your domain.yml file, in âactionsâ sector you should add the name of the actions, not the name of the classes. I think this should fix this error.