I want to integrate my rasa chat bot with an existing google DialogFlow assistant,how can I integrate and not migrate rasa with google DialogFlow
Hi @ShubhamDeshmukh1697, welcome to the forum Could you describe in more detail what your use case is and what you’re aiming for by combining Rasa with DialogFlow rather than migrating? Do you want to use Rasa only for part of the pipeline, e.g. only NLU?
In my company we already have a DialogFlow assistant running on servers and I am working on rasa and have implemented few features related to travel booking and getting data from the database.Now what I want to do is integrate the whole rasa application with DialogFlow including the NLU part and also the custom actions that I have written
Hi, thanks for the further info. Sorry for more questions and if I don’t understand correctly, but what do you exactly mean by “integrate the whole rasa application with DialogFlow”? Should they just run on the same server, should Rasa take over a certain set of the tasks you’re automating with a chatbot, and DialogFlow the others, or do you want to use both Rasa and DialogFlow within the same conversation? In the latter case, could you provide an example which parts should be handled by Rasa vs. DialogFlow? Thanks!
I want rasa and DialogFlow to be included in one common assistant.Some tasks that couldn’t be handled with DialogFlow will be handled by rasa since we can do almost everything using custom actions. The goal is to have one common chat bot implemented using rasa and DialogFlow
Hi @ShubhamDeshmukh1697, as far as I could find out, this is not a common use case and I’m not aware of a standard way of doing this unfortunately.
If you’re saying “some tasks that couldn’t be handled with DialogFlow will be handled by rasa”, does that mean that those are isolated tasks that do not depend on the conversation context before? In that case you could run the two bots in parallel and implement some routing based e.g. on the topic, so if the user wants to book travel → send to rasa, users want to search for a restaurant → send to dialogflow, etc. Is that what you mean? Otherwise a concrete example of a conversation involving the two systems would help understanding better what you’re after.
What I mean is I want the features that I am implementing in rasa gets combined with the already present features of DialogFlow. For example if a user wants to just talk to the bot and ask basic information DialogFlow is capable of handling that but in case the user has a pending travel request present in the database and we want the bot to proactively ask the user whether the user wants to check the status of his pending request, this type of tasks to he handled by rasa because DialogFlow has it’s limitations. There are many scenarios that I want to implement which can be done using rasa but since we have to combine our rasa bot with DialogFlow which is a requirement from the higher authorities we are stuck.
The problem I could see with this setup is that you might lose some important context of the conversation. If the conversation initially takes place in DialogFlow and you get to a point where it should be handed off to Rasa (e.g. for checking the pending request), the information on what the user already provided has to be sent to Rasa as well (for example if the user has already mentioned the id of their travel request or their name, Rasa should not have to ask for it again).
As far as I’m aware you could use the HTTP API for this. See for example this thread going into that direction.
I don’t have any experience with implementing this though, someone else might have to jump in for further help…
There is an obvious problem of how to integrate both bots. Like Matthias has already mentioned there needs to be some routing mechanism which would forward a user request to one of the two bots. So before even a request can be processed either by the DialogFlow or the Rasa bot, you have to decide which bot should response to the request. To solve this issue not trivial.
But let’s assume you would have two bots and would have figured out the routing part. Still, in terms of user experience, the solution would be suboptimal. Think of a situation where a user request is routed to the DialogFlow bot and after getting a response, the user wants to do something else, but it turns out that the second response can be only handled by the Rasa bot. That means you either have to restart the conversation after telling the user that the current bot can’t handle this question or you have to apply the routing logic before each user request. This might not make sense if you have to keep track of the conversation history. And might not even be possible as I assume that DialogFlow uses different data format/logic to store the conversation history in contrast to Rasa.
Additionally, to maintain this solution and to keep developing new features will be very difficult to say the least.
@ShubhamDeshmukh1697 Maybe you can use these arguments to convince your team that a complete migration to Rasa would make much more sense and would be actually easier to implement and maintain.
Yeah @eklein I guess you are right and migrating to rasa bot could be a better option Thanks @MatthiasLeimeister and @eklein for your feedbacks