How to get rid of the list signs [''] in go_bot interaction

Dear Deeppavlov developers,

I’m fairly new to the library and have experienced with the go_bot model in-depth. And this question might seem very rookie but it has bothered me for a while.
So I have built a bot based on the pipeline of gobot_dstc2_best.json. Everything worked fine but when I tried to interact with it with the interact_model module, the machine side of output are wrapped within [’’]
Then when I tried to integrate the bot to Telegram, which is one of my eventual goals, all the outputs from the bot are also wrapped in the list.
I also ran the tutorial gobot_extended_tutorial.ipynb and integrate the trained model to Telegram. Here’s a screenshot and the problem remains.


Because the Telegram bot screenshots in the tutorial have no such problem, I wonder if I missed something. I have tried to trace the code back to models/go_bot/nlg and models/go_bot/tracker but couldn’t figure out which step had the outputs wrapped in a list. How can I get rid of the [’’] list wrappings so the bot output looks more natural to the user?

Thanks

Hey! I’d just took the last elem from the bot response list. I think here the conversion list->str happenned somewhere in between bot and telegram. If only string representation is available you could also use eval e.g.

>>> a = eval("['my', 'list']")
>>> a
['my', 'list']
>>>

NB: with eval, keep in mind safety concerns