Bot name mention in messages from teams

Hi all!

When I added my bot to group chat in teams, I need to mention it for asking something. And when I saw my logs I find out than bot receive message like “BotName my message”. Is it possible to ignore “BotName” for all messages ? It causes some problems with prediction of next action or if message is small for example “Hi” it is returns fallback. Thanks

You can add a custom component at the beginning of your pipeline. Just split the message with the first space:

def process(self, message, **kwargs):
	mts =  message.text.split(' ', 1)
	message.text = mts[1]
1 Like

Thank you, it works!