Slot value not set

I m trying to set value of a slot after an intent, but the value of slot is not set and it remains null this a portion of my story image

And this is my domain file image the issue is with slot project , slot item works fine as i m using entity when before setting its value in the story

If the project entity is not found in the message, its value won’t be saved.

What you can do is, in action_fetch_project, check the intent of the last message (with tracker.get_intent_of_latest_message()) and return a SlotSet according to it:

intent = tracker.get_intent_of_latest_message()

if intent == 'nlp':
    return [SlotSet('project': 'nlp')]
elif intent == 'ai':
    return [SlotSet('project': 'ai')]
else:
    return []

1 Like

Thanks, it was very helpful…

1 Like

Glad to be of help :slight_smile:

By the way, you can also do it using Forms with from_intent mapping for the slot.

i will look into it… which ever way suits the code better will go with that

1 Like

I have the same problem and still no have solution. The problem is how to get slot variabel without using entity or custom action?

In RASA documentation, the slot variable can be captured without using entity or custom action, just slot variable.

You can visit the URL:

https://rasa.com/docs/rasa/responses

Here is the screenshot:

Are your problem has clear, bro?

I have the same problem, how to get slot variable without using entity or custom action?

I used a work around , and it worked for me, in my use case i could make do with just the intent of the last message , else you can also use a custom action and trigger it when a given intent is encountered to set the slot as mentioned above. If you want you can connect with me on discord now , and maybe we can brainstorm a good solution for you my discord: uKNOWwho#8242