How to deliver any file to user

Hello, I am a student and for my university project, I am developing a chatbot.

In my chatbot, I want to deliver zip files to users. Like user request for the zip file and from a chatbot, the zip file should automatically download on user desktop or user click on chatbot response and zip file download on user desktop.

So my idea is to make one server and upload all files on the server. As per the user request file should come from the server and download on the user’s pc.

For that, which approach would be great? Like which framework would be compatible with python and rasa? And what type of server would be great to deliver files?

It would be great if someone explains, step-by-step, like what should I do?

Hey @tanayraj, if I’m honest, this sounds like a fairly general issue, not specific to Rasa. However, there are Rasa-specific aspects that I’ll try to cover.

So, given that you’ve found some way of exposing a zip file at some URL, you can get this URL into Rasa, insert that URL into a bot response text, and let users click it. The way you’d get the URL would likely be via a custom action – from within such action, you can call your server & get the URL for the requested file. Then, the URL can be inserted into bot response text directly from within the custom action, or by setting a slot value to that URL from within the custom action, and then letting variable interpolation take care of the rest :slight_smile:

1 Like

ya, you are right. This is a general issue. But I want to know which way would be good with rasa. Using session or web services. if I am hosting a web server then what would be great with rasa. for example, hosting server using flask?

But, Thank you @SamS

@tanayraj as far as I can see, it genuinely doesn’t matter from the point of view of Rasa Open Source. If you imagine a custom action that calls some API to get some access URL of a requested file, this custom action doesn’t care at all about how it gets to the URL.

Indeed, there are some things to be considered broadly in the context of a conversation, but these aren’t specific to Rasa. One such thing that comes to my mind: If the URL is only temporary, when can it be safely “deactivated”? When the user closes the chat window, or after some set period? And how should this be communicated to the user?