Hello, is it possible within the custom action to call a form in the domain?
@RodrigoLima Hello, as far as I know, it is not possible to call the forms in the dispatcher, for more info on what we can include, please see this ref link : Dispatcher
@RodrigoLima Even, in the code; I can see some error please check the syntax
def run( self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any], ) -> List[EventType]: dispatcher.utter_message(text = "Hi, User!")
Error: you missing
dispatcher: CollectingDispatcher, or I am missing something in the code lines?
In your Custom Action, return the FollowupAction event:
tks, i will make the change.
@nik202 The colon “:” in python is an annotation. It is used for type checking. In other words the variable dispatcher is of type CollectingDispatcher.
In this case, the method run works fine without the type check.
So the method:
def run( self, sender, tracker, domain, ) -> List[EventType]: dispatcher.utter_message(text = "Hello, user!")
works just as well as the method:
def run( self, sender: CollectingDispatcher, tracker: Tracker, domain:Dict[Text, Any], ) -> List[EventType]: dispatcher.utter_message(text = "Hello, user!")
The main difference is that in the last example python knows that the varible dispatcher is of type “CollectingDispatcher”, the varible tracker is of type “Tracker” and the varible domain is of type “Dict”.
Both methods will work, but the latter is the better practice, not an error.
Em bom português: ficou perfeito. Tnks
@ChrisRahme Yes, I missed that Great you sorted the issue.
Feliz por ajudar