I was wondering if there’s any way to extract a message’s metadata in a NLU pipeline component?
This metadata is inserted in our custom channel handler for Facebook Messenger, but it doesn’t show up in the Message object in the process() method of the Component. Is this intended? Is there an easy way to achieve this?
Hi all! Just wanted to add some more context here as I work with @cristianmtr. One thing we want to do is passing some geographic context to the bot so that location entities can be properly disambiguated.
For example, if a user is looking for a place in NYC, we want to be able to differentiate between “Downtown” between NY or other cities so that we get the proper ID for this location. Up until now, we’ve done this mapping in actions so it was easy to use slots for the context. The problem is that we want to extend our location parsing using a custom pipeline component which uses Spacy’s pattern matcher. But we first need our disambiguation before applying the patterns.
That’s why we’re trying to pass some context to the NLU pipeline somehow.
the default interpreter for Agent seems to be RasaNLUInterpreter. But RasaNLUInterpreter does not pass on the metadata in its parse method. How can I get my metadata inside the process method of my custom components.
@rctatman , when I access metadata in nlu pipeline component by using message.get(‘metadata’), its always “None”. Please let me know if it is the correct way of accessing metadata in nlu component.