I’m using forms and i want to get intents name according to a slots value in actions. OR How to get all stories of the conversation in actions ? thank you
responses: utter_greet:
- text: “Hey, {name}. How are you?” Add this in domain - You can use custom code in this way to retrieve the response from rasa_sdk.actions import Action
class ActionCustom(Action): def name(self): return “action_custom”
def run(self, dispatcher, tracker, domain): # send utter default response to user dispatcher.utter_message(template=“utter_default”) # … other code return []
dispatcher.utter_message(template=“utter_greet”, my_variable=“my text”)
When you use RASA X you can be able to find all the conversations that your bot has been having and you could differentiate them on the basis of the conversation ID
Thank you for the reply,
I want to do the following thing : Asking the user some questions and according to his responses (affirm or deny), attribute a score if it affirms, and not if it denies. and at the end of all questions, I want to sum all scores and return a message to the user according to this score.
Can you tell me how to do that? Thank you very much for help
Thank you for the reply,
I want to do the following thing : Asking the user some questions and according to his responses (affirm or deny), attribute a score if it affirms, and not if it denies. and at the end of all questions, I want to sum all scores and return a message to the user according to this score.
Can you tell me how to do that? Thank you very much for help
You can use buttons for your questions and in the custom action part you can write up code everytime the user clicks on the affirm button and similarly everytime the deny button is clicked and them keep a variable to keep track of the affirm response and add a score and another variable to keep track of the no and add a score and then finally sum them up indivually and print them up using a print statement
another way to do that without using the buttons? I want that the user types text (so I need to access the corresponding intent name to see if it is an affirm OR deny)
You could use slots set them to the boolean type like this Slots and then use the same custom action to set scores and evaluate accordingly
Ok thank you. I will try