How to run the customized Facebook Channel code overriding the default code

Hi All, and @akelad

I have done customization to the Facebook Channel code to handle video uploads. https://github.com/RasaHQ/rasa/blob/master/rasa/core/channels/facebook.py#L89. I have that changed code as facebook.py in my local folder. How can I override the core/channels/facebook.py with my customized code? Can I do that notice as a param with rasa run command?

I appreciate your answer.

Be safe.

Regards, Malintha

Hi all,

As a temporary workaround for this, i have altered the rasa.core library Facebook Channel code in the production environment (Although it is not recommended).

Appreciated your support on this to solve this properly.

Hi @malinthasa, you should be able to use the facebook.py in your local folder by providing the path of the class it the module in your credentials.yml:

facebook.FacebookInput:
  ...credentials...
1 Like

@erohmensing can you describe this with a small example. I am also trying to override the facebook.py file, because i need to convert audio file from fb messanger into text by using external API, then pass to rasa nlu.

1 Like

I have copied the facebook.py and pasted as fb.py in root directory and changed my credentials.yml of the facebook section into

   fb.FacebookInput:
     verify: <key>
     secret: <secret>
     page-access-token:<token>

now it is working with this fb.py :wink:

hi, can you please tell me how did you do to convert audio file? iā€™m working on it since 30 days :frowning: