Tracker.get_slot telegram

Hi all, I have a project in rasa the purpose of which is creating a telegram chatbot.

As you can see from the screenshot, I am adding data to telegram chat, however, I want to send data with more info payload

Tracker.get_slot method is the one that I use for taking the value, however, it returns none. Please, provide me information on what the reason can be? If there’s no solution with this method, can you please provide another method that can support the required functionality?

Hi @vanovarderesyan, welcome to the rasa community. Do you have any logs from the action server? Did you configure the slot in the domain.yml file?

2022-05-20 12:40:17 INFO rasa_sdk.interfaces - Tried to access non existent slot ‘instructions’.

in the logs this kind of error arises

This means, that you have not configured the slot in the domain.yml file. What does this file look like?

image

you are missing the slot part:

slots:
  instructions:
    type: text
    influence_conversation: true

image

image

oh, I missed the mapping part:

slots:
  instructions:
    type: text
    influence_conversation: true
    mappings:
    - type: custom

I did what you have told me, and the error had disappeared, however, it doesn’t work as required and the value is null. In the first screens that I have shared earlier, you can check how it’s done.

Moreover, I have another question. I want to have a functionality to detect the users location, who had contacted the bot via telegram. Please, let me know if it is possible and provide more details regarding this. Thanks

Hi, could you, please, respond to the above-mentioned question?

Hi @vanovarderesyan ,

You use the payload to bypass NLU. but you send an instructions entity. Is this entity defined? It should also be mentioned in the mapping for your slot:

slots:
  instructions:
    type: text
    influence_conversation: true
    mappings:
    - type: custom # I am not sure if you need this / I first thought you also set the slot usign custom actions
    - type: from_entity
      entity: instructions

Maybe this is a next step to fix the error.

As I don’t find a solution for the problem, is there a ready solution that you send me as a solution, so I can check and make my modifications based on that?

Hi @vanovarderesyan, I added one block in the slotmapping. Does this help to solve the problem?

I don’t have a ready made solution.

Okay, I have added what you had mentioned, however, I again have the same problem. That is why, I was asking for a ready solution. Don’t you have a public repository, where the things mentioned by you are implemented?