I know that after utter_etape1 the user will give me his ideasmine but I realy don’t know what this will be like. (can’t extract entity, and don’t have examples to set at first) the intent ideasmine is realy random sentences.
So I want to do something after utter_etape1 that allows the user to tape his message and click on button “ok” and in this button ok I will set like a payload to the intent ideasmine. the next action after intent ideasmine is to extract the user input and set it as slot to re use it later (you said previously [slot ideasmine] …).
Or is there any way to tell the bot to listen to the next user input after utter_etape1 and set it directly as ideasmine intent.
Thank you for your answer, actualy i tried that.
But this is not what I want, here is an example:
bot: write your ideas now, and then click on the button.
user: random ideas that comes to my mind (I want to take this sentence and set it as a slot called
ideasmine, and i want my bot to recognize it as an intent "ideasmine" to follow the story)
bot: ok your idea is : random ideas that comes to my mind.
If i do like you said, I’ll use a button with payload: “/ideasmine” but in this case the bot will just understand that this was intent ideasmine but will not asnwer with ok your idea is : random ideas that comes to my mind
class action_SendIntentProblemeSite(Action):
def name(self):
return 'action_SendIntentProblemeSite'
def run(self, dispatcher, tracker, domain):
message = tracker.latest_message
#print(message)
return [SlotSet('intent_probleme_site', message)]
class action_SendIntent_B_S(Action):
def name(self):
return 'action_SendIntent_B_S'
def run(self, dispatcher, tracker, domain):
loc = tracker.get_slot('intent_probleme_site')
response = """ ok your idea is : {}. """.format(loc['text'])
dispatcher.utter_message(response)
I’ve updated my message to show my actions. I actually want the bot to recognize the user input as intent ideasmine in order to follow the story and not ignore it
If you don’t have any example for your intent, rasa will not be able to recognize it.
The only idea that comes to my mind is to add a pop up in your chat with a text field and then when the user press the “Ok” bouton in the pop up, you send the payload.
I’ll try it, not sure if I explained well my problem. My problem is that the bot don’t have any way to predict that :
user: random ideas that comes to my mind
is an ideasmine intent, the bot will not know because I don’t know how what this intent will have as input; so I just have an intent called ideasmine but with random things.
Actualy my problem is exactly as @huberrom said.
I thought I could use a button and after the user click on it I save the input as slot ideasmine and payload: \ideasmine
Thank you for the answer. I’ll try to found a way to do it. My stupid solution was to tell the user to begin his message by ideasmine: and then in my intent indeasmine i added ideasmine:
But it’s not good to tell the user to begin his sentence with: …
any way thank you for your answers, thank you also @JiteshGaikwad