Skip to content

Commit

Permalink
Merge pull request #41 from KI-Campus/add_custom_group_DFKI
Browse files Browse the repository at this point in the history
add custom group to actions_recommender
  • Loading branch information
theresazobel authored Nov 6, 2023
2 parents 93f7b2b + d74c726 commit 88add8a
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions rasa/KI-Campus_de/actions/actions_recommender.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,11 @@ def run(self, dispatcher: CollectingDispatcher,
else:
text = get_response(self.responses, self.Responses.ask_select_language)

dispatcher.utter_message(text=text, buttons=buttons)
custom_buttons = {
"buttons": buttons
}

dispatcher.utter_message(text = text, json_message=custom_buttons)
return []


Expand Down Expand Up @@ -482,7 +486,11 @@ def run(self, dispatcher: CollectingDispatcher,
else:
text = get_response(self.responses, self.Responses.ask_select_topic)

dispatcher.utter_message(text=text, buttons=buttons)
custom_buttons = {
"buttons": buttons
}

dispatcher.utter_message(text = text, json_message=custom_buttons)
return []


Expand Down Expand Up @@ -518,7 +526,11 @@ def run(self, dispatcher: CollectingDispatcher,
else:
text = get_response(self.responses, self.Responses.ask_select_level)

dispatcher.utter_message(text=text, buttons=buttons)
custom_buttons = {
"buttons": buttons
}

dispatcher.utter_message(text = text, json_message=custom_buttons)
return []


Expand Down Expand Up @@ -554,7 +566,11 @@ def run(self, dispatcher: CollectingDispatcher,
else:
text = get_response(self.responses, self.Responses.ask_select_duration)

dispatcher.utter_message(text=text, buttons=buttons)
custom_buttons = {
"buttons": buttons
}

dispatcher.utter_message(text = text, json_message=custom_buttons)
return []


Expand Down Expand Up @@ -589,8 +605,12 @@ def run(self, dispatcher: CollectingDispatcher,
text = get_response(self.responses, self.Responses.confirm_and_show_change_certificate)
else:
text = get_response(self.responses, self.Responses.ask_select_certificate)

custom_buttons = {
"buttons": buttons
}

dispatcher.utter_message(text=text, buttons=buttons)
dispatcher.utter_message(text = text, json_message=custom_buttons)
return []

###################################
Expand Down Expand Up @@ -864,5 +884,9 @@ def run(self, dispatcher: CollectingDispatcher,
button_payload = "/{}".format(intent['name'])
buttons.append({"title": button_title, "payload": button_payload})

dispatcher.utter_message(text=text, buttons=buttons)
custom_buttons = {
"buttons": buttons
}

dispatcher.utter_message(text = text, json_message=custom_buttons)
return []

0 comments on commit 88add8a

Please sign in to comment.