How to send pdf files as attachment to rasa chatbot

Hi,

How to send pdf files as attachment to rasa chatbot ?

I want to send the pdf file to rasa chatbot for download.

Is it possible ?

-thanks Vishal

to understand the requirement better:

  1. do you need to send the PDF as an attachment to the bot-server instance or
  2. you want the attachment back from chat bot server to the user chat box?

if the answer is 1, then I guess the server is built for text classification and in this case a pdf type file might consist binary contents which is inappropriate for text classification, so you might have to convert the PDF in client end into text with some 3rd party plugin and then send the text chunk back to RASA engine for classification

if you r answer is 2, then you might send a PDF-link in the result JSON back from RASA to client, where you can process the link in client chatbox program to download the PDF from the link.

Hi,

Thanks for the reply.

I have second scenario, where i need to send attachment back to user chat box.

Is there any way i can send the file itself in the chat instead of link ?

-thanks Vishal

@vishalk ,

There is no way to do that, as the response format is text, not binary.

you can simply send the link to download like

utter_response:

- text: " ..... to download the pdf file please [click here](http://....../test.pdf).