Using one entity for more then one slot

Hello guys,

I’m using RASA 2, and I need to ask a lot of questions to the user and save the responses in a slot.

That’s the way I thought I could build:

Domain:

intents: inform_felling
entities: felling_keyword
slots:
  felling_energy:
    type: text
    influence_conversation: false
  felling_behave:
    type: text
    influence_conversation: false

  utter_felling_energy:
  - text: What do your energy levels look like?
  utter_felling_behave:
  - text: How do you behave?
  utter_felling_prioritise:
  - text: What are you prioritising?

Stories:

  - action: utter_felling_energy
  - intent: inform_felling
    entities:
    - felling_keyword: High
    - felling_keyword: calm
  - slot_was_set:
    - felling_description: calm
  - action: utter_felling_behave
  - intent: inform_felling
    entities:
    - felling_keyword: concious
    - felling_keyword: kind to people
  - slot_was_set:
    - felling_behave: kind to people

But all my slots are turning null, there are a better way to build that?

Its because you don’t adding any slot value hahaha

Maybe, you can use button with set Slot

utter_felling_energy::
  - buttons:
    - payload: /felling_behave{{"felling_energy":"High"}}
      title: High
    - payload: /felling_behave{{"felling_energy":"calm"}}
      title: calm
    text: What do your energy levels look like?

or… set slot in stories:

 - slot{"felling_energy":"High"}

or… create a action to set values in slot

Hey @itsjhonny,

I can’t use buttons! Because my user needs to be able to respond a lot of things.

Do you know how I can create an action to save in one slot all the array of entities found in user sentence?

In that way I can use one entity that is already build, otherwise I will have entities with very similar values.

Ahhh, now understand the case. Sorry for my confusing haha :stuck_out_tongue:

I don’t have any good idea in this moment

Maybe, Rasa Form will be the way to go

Or… maybe create slot with Type: text and use python json_encode() and json_decode() to storage this entities array

I don’t know, sorry :cry: