In my use case I have to send an attachment to an API.
Lets take example
Bot : Do you have template
User : Yes
Bot : Please provide a template
User: Upload the template of a file.
After this bot has to perform an action to perform a POST request sending the attachment.
Can anyone help how to handle this . I am not able to understand how rasa_nlu is going to treat this attachment.
rasa_nlu should ignore the attachment. As for storing it, you should be able to in a custom action somehow, but it depends on the messenger platform you’re using.
I am using a custom UI. I have to fullfil a conversation by sending an attachment. Any idea how to achieve this. This attachment will be required to send an API request to some other application .
Instead of using server side scripting, I converted the attachment to a json in JavaScript and passed the data to the RASA along with message as payload and performed action as per my requirement
When a message is passed to RASA core you can add a key.
For example : { message : “your query”, payload: “attached data”}
In RASA core u can fetch it and act accordingly. this is the way I have done for my custom user interface. Also in my case , attachment is Excel or CSV so for me it is working
User will send two things as two separate messages-> message and then the attachment… and since Rasa treats each query as an individual query, how do I combine these two?
Hi @rasa5,
I made my custom server in order to achieve this using flask. Once you have created the server,you need to launch it. Also there will be certain condition on UI side that tells us whether file is uploaded or not. If file is uploaded we are going to capture those flags which will also be passed as payload. Once we have reached the server, the payload is decoded and necessary action can be taken .