I want to fill my slots in a form with values of the same entity. However, when one slot is mapped to multiple active loops it will get filled together with the requested slot. How can I avoid this?
To clarify, the user asks “I want to buy pizza.”
Bot asks for pizza size and the option can be custom (alg.entity) or for example large (pizza_size) then the second slot pizza_type the option can be custom alg.entity or for example hawaii (pizza_type)
when the mapping of pizza_type includes more then one active loop. It will will this slot with custom as well when custom is given for pizza_size. However when mapping has only one active loop this won’t happen.
nlu.yml (1.8 KB) rules.yml (368 Bytes) stories.yml (542 Bytes) synonyms.yml (109 Bytes) domain.yml (1.5 KB)
domain
version: "3.1"
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- buy_pizza
- inform
entities:
- pizza_type
- pizza_size
- alg.entity
responses:
utter_greet:
- text: "Hey! How are you?"
utter_cheer_up:
- text: "Here is something to cheer you up:"
image: "https://i.imgur.com/nGF1K8f.jpg"
utter_did_that_help:
- text: "Did that help you?"
utter_happy:
- text: "Great, carry on!"
utter_goodbye:
- text: "Bye"
utter_iamabot:
- text: "I am a bot, powered by Rasa."
utter_ask_pizza_size:
- text: "What size would you like"
utter_ask_pizza_type:
- text: "what kind off pizza would you like?"
slots:
pizza_size:
type: text
influence_conversation: true
mappings:
- type: from_entity
entity: pizza_size
conditions:
- active_loop: simple_pizza_form
- type: from_entity
entity: alg.entity
conditions:
- active_loop: simple_pizza_form
pizza_type:
type: text
influence_conversation: true
mappings:
- type: from_entity
entity: pizza_type
conditions:
- active_loop: simple_pizza_form
- type: from_entity
entity: alg.entity
conditions:
- active_loop: simple_pizza_form
- active_loop: test_loop
forms:
simple_pizza_form:
required_slots:
- pizza_size
- pizza_type
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
rules:
version: "3.1"
rules:
- rule: Say goodbye anytime the user says goodbye
steps:
- intent: goodbye
- action: utter_goodbye
- rule: Say 'I am a bot' anytime the user challenges
steps:
- intent: bot_challenge
- action: utter_iamabot
- rule: Activate Pizza Form
steps:
- intent: buy_pizza
- action: simple_pizza_form
- active_loop: simple_pizza_form
nlu:
version: "3.1"
nlu:
- intent: greet
examples: |
- hey
- hello
- hi
- hello there
- good morning
- good evening
- moin
- hey there
- let's go
- hey dude
- goodmorning
- goodevening
- good afternoon
- intent: goodbye
examples: |
- cu
- good by
- cee you later
- good night
- bye
- goodbye
- have a nice day
- see you around
- bye bye
- see you later
- intent: affirm
examples: |
- yes
- y
- indeed
- of course
- that sounds good
- correct
- intent: deny
examples: |
- no
- n
- never
- I don't think so
- don't like that
- no way
- not really
- intent: mood_great
examples: |
- perfect
- great
- amazing
- feeling like a king
- wonderful
- I am feeling very good
- I am great
- I am amazing
- I am going to save the world
- super stoked
- extremely good
- so so perfect
- so good
- so perfect
- intent: mood_unhappy
examples: |
- my day was horrible
- I am sad
- I don't feel very well
- I am disappointed
- super sad
- I'm so sad
- sad
- very sad
- unhappy
- not good
- not very good
- extremly sad
- so saad
- so sad
- intent: bot_challenge
examples: |
- are you a bot?
- are you a human?
- am I talking to a bot?
- am I talking to a human?
- intent: buy_pizza
examples: |
- I want to buy a pizza
- I'd like to buy a pizza
- I want a pizza
- Can I buy a pizza
- intent: inform
examples: |
- i want to order a [xl](pizza_size) [hawai](pizza_type) pizza
- [veggie](pizza_type)
- [fungi](pizza_type)
- i'd like a [large](pizza_size) pizza
- I want to order a [custom](alg.entity) pizza.
- I want to order a [custom](alg.entity) size pizza