question

MosheLevi-2396 avatar image
1 Vote"
MosheLevi-2396 asked MosheLevi-2396 commented

Manipulate (translate) user's input before it is injected into the bot


I useing Microsoft bot composer framework, and I want to change the user's input before it is injected into the bot. Can it be done?

The purpose of the change is to translate the user's input into English, because the language of the user's input is not supported by LUIS.

I was try to access the input in the controller, But I did not find where the input is stored in the existing objects there (like 'Request' or '_bot').

I do not want to do the translation inside the bot, because I want to use the input already for the trigger recognition. Thanks!

azure-bot-service
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GiftA-MSFT avatar image
0 Votes"
GiftA-MSFT answered MosheLevi-2396 commented

Hi, thanks for reaching out. You may be able to implement middleware to translate user inputs. I found a tutorial that may be helpful.


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, thanks for your response, The example in this tutorial uses bot SDK. Are you sure it can be implemented with composer too?

0 Votes 0 ·

Yes, you can extend your bot framework composer using middleware.


0 Votes 0 ·

The truth is I know this ability, but I did not understand how it relates to middleware.
Anyway, I found an issue that addresses exactly my need. Unfortunately even through him I could not move forward. If you can look there and direct me further, it will help me a lot. Thanks!


0 Votes 0 ·