I have created a form that captures 2 slot values slt1 and slt2 using 1 form and now I want to reply back to the user by using the slt1 values before the form is ended and before asking the slt2 value: without using actions.py So, Is it possible to do this? And If possible then how to do it?
Expected conversation :
Bot: asks the question
user: selects the response using the button
bot : you have selected {sllt1}
bot: asks question 2
user : selects the reponse using button
bot : you have selected {slt2}
This is my rules file
rules:
#rules for mood question 1 :
- rule: Activate form 1
steps:
- intent: survey_1_intent
- action: survey1_form
- active_loop: survey1_form
- rule: Submit form 1
condition:
- active_loop: survey1_form
steps:
- action: survey1_form
- active_loop: null
- slot_was_set:
- requested_slot: null
This is my domain file
version: '3.0'
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
intents:
- survey_1_intent
- survey_2_intent
forms:
survey1_form:
required_slots:
- slt1
- slt2
slots:
slt1:
type: text
influence_conversation: true
mappings:
- type: from_text
conditions:
- active_loop: survey1_form
requested_slot: slt1
slt2:
type: text
influence_conversation: true
mappings:
- type: from_text
conditions:
- active_loop: survey1_form
requested_slot: slt2
responses:
utter_ask_slt1:
- text: How would you best describe your mood today ?
buttons:
- title: Comfortable
payload: Comfortable
- title: Satisfied
payload: Satisfied
- title: Enthusiastic
payload: Enthusiastic
- title: Frustrated
payload: Frustrated
- title: Stressed
payload: Stressed
- title: Anxious
payload: Anxious
utter_slt1:
- text: You choose {slt1}!
utter_ask_slt2:
- text: How ibe your mood today ?
buttons:
- title: Comfortable
payload: Comfortable
- title: Satisfied
payload: Satisfied
- title: Enthusiastic
payload: Enthusiastic
- title: Frustrated
payload: Frustrated
- title: Stressed
payload: Stressed
- title: Anxious
payload: Anxious
utter_slt2:
- text: You choose {slt2}!
# actions:
This is my nlu file
version: "3.1"
nlu:
- intent: survey_1_intent
examples: |
- question one
- start question one
- intent: survey_2_intent
examples: |
- question two
- start question two