How to make a menu based on numbers
Example:
- Option one
- Option two
- Option three
How to make a menu based on numbers
Example:
@NikoAP77 Hi, you want that user type 1 or 2 or 3 and your message will come? right?
@NikoAP77 I hope this will solve your issue?
In domain.yml
intents:
- one
- two
- three
utter_menu:
- text: Select the topic or write your question below.
buttons:
- title: '1'
payload: /one
- title: '2'
payload: /two
- title: '3'
payload: /three
utter_ask_one:
- text: you selected one
utter_ask_two:
- text: you selected two
utter_ask_three:
- text: you selected three
In nlu.yml
version: "2.0"
nlu:
- intent: one
examples: |
- 1
- one
- one please
- 1 please
- intent: two
examples: |
- 2
- two
- two please
- 2 please
- intent: three
examples: |
- 3
- three
- three please
- 3 please
In stories.yml
version: '2.0'
stories:
- story: one menu
steps:
- intent: one
- action: utter_ask_one
- story: two menu
steps:
- intent: two
- action: utter_ask_two
- story: three menu
steps:
- intent: three
- action: utter_ask_three
Please mention other important code in domain, it will run based on selection and whilst user input. If code not run, may be I made some stupid error.Good Luck!
Hello @NikoAP77 If you able to solve this error with the above suggestion/solution please can I request to close this thread with the solution for others, who are seeking the solutions. Thanks
No, entering 1, 2 or 3 you get an incorrect answer
@NikoAP77 Thanks for the feedback, If you got some time later, do share your solutions for others I insist
@NikoAP77 Well, my code is 1000% correct, I know what I did and I love it
Please see the below outputs of the above suggested code:
Selection base on buttons:
Selection base on user input:
I even mentioned “If code not run, may be I made some stupid error” but I think I should not even wrote this. You just need to customised as per your need but… Next time please run the code and then provide the feedback please.
Good Luck for life!
Can you pass me your project, please
@NikoAP77 Is this for me Niko ?
yes
@NikoAP77 I need to check, give me some time please. I will share the code here, even I have only used the above mention code only, nothing new.
@NikoAP77 Do check the code once again, it’s almost 27 days; I only send the related files. I hope you will run the code successfully, if you find any issues do let me know.
domain.yml (589 Bytes) stories.yml (495 Bytes) nlu.yml (260 Bytes)
I request you to please mark this thread as a solution for others and good luck!
@NikoAP77 Hey any feedback on the uploaded files which you had asked?
Hi, thanks for ypur answers, i keep on your discussions and I tried your code. But I encounter a problem when I input the menu numebr (1,2,3), the system cant understand the numeric input. Any possible solution?
Check my shared files and you will do it. @revonsio