Rasa API is injecting an intent correctly but fails to recognize the entities

Hi, i am trying to inject an intent (infoLink) using the rasa API with the http request shown below. The intent is successfully injected but the entity ‘banco’ is not recognized, since it is still None after the request. Please your kind help to solve the entity recognition to complete the slot filling of the entity ‘banco’. Thank you!

curl -H “Content-Type: application/json” -X POST -d ‘{“name”: “infoLink”, “entities”: {“banco”: “BANCOLOMBIA”}}’ “https://localhost:5005/conversations/whatsapp:+57123456/trigger_intent?output_channel=twilio”

That does look a bit strange. It feels like you’re indeed using the API in the right way.

Could you perhaps share what you get back as a response? That would help to debug this further.

@koaning Hi, thanks for the response. the rasa version is rasa==1.10.14 Currently i am sending the request as follows, which would be the same as in the curl request.

This is part of the domain file where the intent infoLink which is the one that i want to inject triggers the action darLink

Screenshot from 2020-10-26 18-11-21

And for testing purposes the only thing that darLink does is printing the slot

Screenshot from 2020-10-26 18-14-26

This is what happens when the http request is run

As you can see even if the intent is being injected and the action is executed, the slots are still all set to None.

Screenshot from 2020-10-26 18-28-07

I would be really helpful if you can help me with this. Thanks again.

Hi @franciscoreales1,

in the future, feel free to post the actual text into the channel instead of the screenshots. That way we can more easily copy/paste the code and help you debug. If you want to share code you can use the markdown syntax to give the code proper highlighting too. You can read more about that syntax here.

That said, it seems like you’re retrieving a slot, not an entity in your code. An entity is something detected in the current utterance while a slot is more like long-term state that is being tracked. An entity is typically turned into a slot using a form or custom action but there’s a subtle difference.

You can get entities from the tracker via;

tracker.latest_message['entities']:

Could you try using that in your custom action?

@koaning, Yes, it worked!! thank you very much for your kind help

1 Like

Hi guys, I’m trying to do a similar thing of francisco: I need to set a slot in my bot when I click on a photo of my local webpage. How can I do that? For example I have 2 photo X and Y in my webpage: If I ask the bot (it’s yet implemented in webpage) “what is X?” or “what is Y?” the bot works. But I want that if I ask the bot “what is this?” , he has to answer in the right way according with the photo that the user clicked. Can you help me?