Hi I am new to Rasa ! and i am working on the requirement to create a chat bot using rasa,
Now i need help on how to allow the chat bot to display the list of options so that user can type answer
for eg
Bot : how severe is your headache
option1 : Mild
Option 2: Moderate
option 3: severe
but currently i have defined these values in my domain file under slots and templates
i am not getting the desired result ! pls help
Img1:
Here âutter_confirmâ is a template in domain file in which there are 2 buttons Correct & Incorrect. âpayloadâ is used for matching of the intent.
In your case, buttons can be âmildâ,âmoderateâ,âsevereâ and its respective payloads can be matching intents.
Img2:
This is the output of buttons if you are running ârasa shellâ
Img3:
This is the output of buttons if you are running ârasa xâ
Thanks @varunsapre10
currently my structure in domain file been
slots:
symptom:
type: text
sideeffect:
type: text
Severity:
type: categorical
values:
- Mild
- Moderate
- Severe
utter_askSeverity:
- text: âCan you explain the level of the severity of your symptom,choose any one of theseâ
buttons:
- title: âMildâ
payload: â/Confirm_severity{âSeverityâ:âMildâ}â
- title: âModerateâ
payload: â/Confirm_severity{âSeverityâ:âModerateâ}â
- title: âSevereâ
payload: â/Confirm_severity{âSeverityâ:âSevereâ}â
is this fine to proceed with or am i missing some thing , also i have defined my conversations in templates , is that actions file is mandatory apart from this
Iâm not able to understand the indentation here in the forum. Try running and then reply with a screeshot if any errors.
The actions file is mandatory if you have a custom action, if not then it is not mandatory.
below is my domain template format
story snippet
output :its not been taken up bot , means the question is been skipped and moved to thanks
did you add âutter_confirmâ to the action list in domain file? Also, run the action server this time.
yes i added in my domain file under actions , sry can you explain me how to execute action server , i am completely new to rasa
You can execute the action server by ârasa run actionsâ and then in another terminal ârasa shellâ or ârasa xâ.
EDIT : After the âutter_confirmâ you should check if any of the intent from mild,moderate,severe is met or not.
ex:
- check_severity
- mild OR moderate OR severe
This shows how when utter_confirm is executed, if âcorrectâ intent is met, then âaction_xyzâ is performed.
This shows the payloads that i have used which should be similar to the intent. if correct is my intent then that should be my payload as well.
1 Like
Kindly refer Actions for more info on the usage of actions.
Thanks @varunsapre10 ! issue been resolved