I have a Microsoft framework based cognitive BOT with LUIS and QnA cognitive service now due to some reason I have to switch to Amazon cloud service and due to that, I will end up with doing a fresh development from the scratch.
So I am looking for a framework/pattern through which I can do development and be able to switch across any cloud platforms like Google, IBM, etc in the future?
if you implement the conversational aspect yourself (i.e. without relying on a platform) then an option is to develop a generic chatbot which accepts incoming requests (text, events) and provide a response which you can abstract in your design.
interface Response
interface TextResponse extends Response
interface MultiOptionsResponse extends Response
You can then provide different Channel adaptors (MS Bot, Facebook, Telegram, etc..) which serialises your model above into the specific Channel json format.
You can integrate in your backend NLP functionality for example and still maintaining the same abstraction.
A more pragmatic way
My experience is that the advantage of building your Chatbot on a specific platform outweighs any other disadvantage. You can normally rely on features (NLP, multi-channels, metrics) that enables to ship much faster.
The real deal is to ensure you can decouple any logic/component/feature that must not be strictly embedded in the Chatbot, for example creating libraries (or services) for business logic (book a trip, perform a search), persistence (save the conversation, retrieve user last access) or even helpers (translation, entity recognition).
Hope this makes sense.