Edit channel.py - rasa core

Hi everyone, hope you are doing well !

So I’m trying to upload a file (pdf) to my chatbot and then do something with it’s content , like extracting the text. My connection between the chatbot and UI it’s through socket io, and in my UI I’m trying to send the file like a message. It’s possible to modify the channel.py to be able to handle a file instead of only text ?

I really don’t know if this it’s the right approach to my problem, so if anyone has another way of doing this I would love to read your opinions!

Thank you

You can create your custom channel where you can handle the request object in any way you want (and that includes doing file-related things). You can find the documentation on that here - Custom Connectors.

1 Like

Thank you @msamogh for your response!

Could you please show me the custom code?