Using slot in a story


I want my bot to utter to the user’s second greeting in a different way. The bot remembers that he has greeted already using a slot. But the bot doesn’t take into account the slot and therefore answer to the second greeting as it was the first time. What should I correct in my files?

Part of my domain.yml:

    type: categorical
      - True
      - False
- have_greeted

  - buttons:
    - payload: '/greetings.hello_2{"have_greeted":"True"}'
      title: What can you do?
    text: Hi! ...

Part of my ## story hello again *greetings.hello - slot{“have_greeted”:“True”} - utter_greetings.hello_again

## story hello
    - utter_greetings.hello
*greetings.hello_2{"have_greeted": "True"}
    - utter_greetings.hello_2

Part of my config.yml: policies:

  • name: AugmentedMemoizationPolicy
  • name: TwoStageFallbackPolicy nlu_threshold: 0.5 core_threshold: 0.6 fallback_core_action_name: action_default_fallback fallback_nlu_action_name: action_default_fallback deny_suggestion_intent_name: deny suggestion
  • name: MappingPolicy

have you tried setting an intial value of “False”?

How Slots Get Set
You can provide an initial value for a slot in your domain file:
type: categorical
initial_value: “False”

and changing your first story to:

*greetings.hello{“have_greeted”: “False”}

Today I have tried your suggestion and other different options. They don’t work. I think that rasa doesn’t read current slot value when I write *greetings.hello - slot{“greeted”:1}