Is it possible to access the tracker of a conversation through a NLU custom component?

Hi there Rasa community,

I’m currently developing a bot using Rasa and I was wondering if it’s possible to access the tracker of a conversation with a custom nlu component?

I already saw the docs and examples for a custom nlu component and saw that the “process” method of the Component Class has a “message” input as argument, so I was wondering if we have access to the tracker through the component?

If it’s not possible, is there a workaround?

Thanks!

Hello,

I’ve read a PR in the github discussing about putting tracker into the NLU components. I read the Rasa main code and I see that the Agent and Processor class are passing tracker to the Core’s NaturalLanguageInterpreter parse method, but inside that class, the tracker isn’t being passed to the NLU’s Interpreter class and I’m not sure why. I haven’t tried this myself, but one user in the forum is handling it like this: Providing conversation context to the NLU using microservices

Other ways you can do is probably to create custom NaturalLanguageInterpreter and Interpreter class, and pass it to the Agent when you initiate Agent class.

Thanks for your response @tomgun132 , I will definitely check out what you are saying!