The default answer of the RASA chatbot is the sender id and the answer text, but I want to return more metadata, like the message id. I saw to do that, it is necessary to develop a channel for each type I want (Rest and SocketIO), if I’m not wrong. But I think it is too complicated for that small thing. Is it already the only way? There is any tutorial to do that?
You can access it all with the variable tracker inside a Custom Action.
Do print(tracker) and you will see, on the same terminal where you ran rasa run actions, what it contains. You can use it like a normal Python dictionary to get whatever you want.
For example, tracker.latest_message contains, among others, text and message_id. Access them like so:
msg = tracker.latest_message
text = msg['text']
msg_id = msg.message_id
Hi there!
I have a question related with the tracker.
I’m doing a bot with rasa and telegram and I want to delete the conversation with the bot when it finishes.
Telegram has a function to do so but I need the chat id and the message id. I can get the chat_id using tracker.sender_id but the message id of the sent messages by the user are not correct, and I cannot track the messages sent by the bot. Do you know how could I do that?
Hi José Manuel,
I also have the same problem, can you share the solution with me.
In your code, it looks like you are adding keys to each of the bot’s responses. So where are these keys stored? Do you have a custom tracker store to store the keys?
And how to get sender_id for Alexa Skill Kit?
Because I’m using payload['session']['user']['userId'] this values always return default. In this way I have to create a chat session. Where can I to implement this feature?