My target is to build simple form bot which ask user a multiple competence questions and those ones which user don’t have competence, system should mark those and then, after test, output course links for those weak areas. i.e. if user has 4 weak points there are 4 links, each question has own link
I have done the bot part end form works well but I don’t know how to get this kind of output?
Ah, gotcha! In that case I’d probably handle this in an action. With the SDK you can check the value of a slot using tracker.get_slot('slot name'). You can use that to check each of your answers, create a new utterance based on it and then set the slot for a new slot to the text you want tit to be.
So your actions.py file would look something like:
from rasa_sdk import Action
from rasa_sdk.events import SlotSet
class ActionGetCurriculum(Action):
def name(self) -> Text:
return "action_check_restaurants"
def run(self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
curriculum = "hello, here are links for programming languages you need to practice:"
python = tracker.get_slot('python')
if python == True:
curriculum = curriculum + "\n link"
return [SlotSet("curriculum_slot", curriculum)]
Then you’ll need to run a server for your actions separately. (Also, if you have quite a few questions, a form might save you some time. :))