Thanks to Oracle A-Team, I had a chance to work with Chatbots.
3 pure NodeJS applications, on couple of Oracle Cloud platforms and Facebook messenger, and my chatbot was running.
Let me explain, the architecture a bit. To start with, following is the simple representation of how it works.
Message Platform Server : Is a NodeJS application, deployed on Oracle Application Container cloud, acts as a channel between Facebook Messenger and the chatbot engine. It simply converts the incoming messages from Facebook and sends it to chatbot readable format. Also, when chatbot replies, it converts to Facebook readable formats and passes it to messenger.
Chatbot Engine : Is a NodeJS application, which communicate with some REST APIs based on a conversation flow document and moves the flow of the conversation from one state to another.
Flow JSON : Where we document, every state of a conversation and which APIs to call to generate a response. For example, at the beginning of the conversation, start from "menu" state, and call "/start" API. The flow metadata file is driving the behavior of the bot engine. The bot engine uses a finite-state-machine (FSM) to drive the conversation. Every step in the conversation is modeled as a state, and all possible next steps to move the conversation to a next state are defined as state transitions. Every time a state is entered, the response elements defined for this state in the flow metadata are processed and the response is constructed and returned to the messaging platform.
Component APIs : Where several microservices are running, In my case I create a set of APIs, named Airport API which returns, starting from get flight info based on flight number, where is the check-in gate, baggage information, delayed flights etc.
Every component api should have a flow json, which defines that state transitions in the conversation and which APIs to call inorder to generate the response of the chat.
Now a bit more details about Component APIs and Flow JSON relationship.
In my case, Airport API, so I will explain my flow json in context to that.
First of all, below is the structure of each "state" in the flow json.
Each state has a "stateName", which generates a "response", using one or multiple component APIs. Optionally, it can also provides some options, which user can choose to further communicate with the chatbot.
Each of these options, generates an Event, which is mapped to another "state".
There is a special "state" called "stateTransitionError", it gets invoked when chatbot engine cannot translate/understand user input and it gives user option to navigate to the "start" state.
This is a simple, state transition map, only depicting a single flow.
Regarding the Flow, a multiple approach can be used, rather than writing a huge JSON document :
Here is a GIF of the running bot :
According to Oracle A Team, Oracle will soon release an intelligent bot cloud, which will be used then to replace the messaging platform server and chatbot engine.
3 pure NodeJS applications, on couple of Oracle Cloud platforms and Facebook messenger, and my chatbot was running.
Let me explain, the architecture a bit. To start with, following is the simple representation of how it works.
Message Platform Server : Is a NodeJS application, deployed on Oracle Application Container cloud, acts as a channel between Facebook Messenger and the chatbot engine. It simply converts the incoming messages from Facebook and sends it to chatbot readable format. Also, when chatbot replies, it converts to Facebook readable formats and passes it to messenger.
Chatbot Engine : Is a NodeJS application, which communicate with some REST APIs based on a conversation flow document and moves the flow of the conversation from one state to another.
Flow JSON : Where we document, every state of a conversation and which APIs to call to generate a response. For example, at the beginning of the conversation, start from "menu" state, and call "/start" API. The flow metadata file is driving the behavior of the bot engine. The bot engine uses a finite-state-machine (FSM) to drive the conversation. Every step in the conversation is modeled as a state, and all possible next steps to move the conversation to a next state are defined as state transitions. Every time a state is entered, the response elements defined for this state in the flow metadata are processed and the response is constructed and returned to the messaging platform.
Component APIs : Where several microservices are running, In my case I create a set of APIs, named Airport API which returns, starting from get flight info based on flight number, where is the check-in gate, baggage information, delayed flights etc.
Every component api should have a flow json, which defines that state transitions in the conversation and which APIs to call inorder to generate the response of the chat.
Now a bit more details about Component APIs and Flow JSON relationship.
In my case, Airport API, so I will explain my flow json in context to that.
First of all, below is the structure of each "state" in the flow json.
Each state has a "stateName", which generates a "response", using one or multiple component APIs. Optionally, it can also provides some options, which user can choose to further communicate with the chatbot.
Each of these options, generates an Event, which is mapped to another "state".
There is a special "state" called "stateTransitionError", it gets invoked when chatbot engine cannot translate/understand user input and it gives user option to navigate to the "start" state.
This is a simple, state transition map, only depicting a single flow.
The flow is written in Mustache(https://mustache.github.io/mustache.5.html). It is a simple “logic-less” template engine. It works by expanding tags in a template using values provided in a JSON object. It is "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values. A state definition in mustache looks like this :
{"name": "flightDetails", "type" : "response"
,"responseItems" :
[ { "type":"prompt", "languages":
[{"language":"en","prompt": "Your flight departs at {{flowScope.departureTime}} , {{#isDelayed}} And, it looks like, your flight has reported a delay in departure. Sorry about that. {{/isDelayed}}"}
]
}
,{"type":"prompt","languages":
[{"language":"en","prompt": "Do you want, the following info on your flight?"}]
,"options" :
[{"payload" : { "event" : "immigrationInfo" }
,"languages" :
[{"language": "en", "prompt": "Immigration Info"}]
}
,{"payload" : { "event" : "checkinInfo" }
,"languages" :
[{"language": "en", "prompt": "Check-in Counter/Gate"}]
}
,{"payload" : { "event" : "onlineCheckin" }
,"languages" :
[{"language": "en", "prompt": "Online Check-in URL"}]
}
]
}
]
,"componentServices" : [{"name" : "getFlightDepartureTime"
,"inputParams":[{"name" : "flightNo", "value": "{{flowScope.enterFlightNo}}"}]
,"outputParams": [{"name" : "departureTime","scope": "flow"}]
}
,{"name" : "getIsFlightDelayed"
,"inputParams":[{"name" : "flightNo", "value": "{{flowScope.enterFlightNo}}"}]
,"outputParams": [{"name" : "isDelayed","scope": "request"}]
}
]
}
,"responseItems" :
[ { "type":"prompt", "languages":
[{"language":"en","prompt": "Your flight departs at {{flowScope.departureTime}} , {{#isDelayed}} And, it looks like, your flight has reported a delay in departure. Sorry about that. {{/isDelayed}}"}
]
}
,{"type":"prompt","languages":
[{"language":"en","prompt": "Do you want, the following info on your flight?"}]
,"options" :
[{"payload" : { "event" : "immigrationInfo" }
,"languages" :
[{"language": "en", "prompt": "Immigration Info"}]
}
,{"payload" : { "event" : "checkinInfo" }
,"languages" :
[{"language": "en", "prompt": "Check-in Counter/Gate"}]
}
,{"payload" : { "event" : "onlineCheckin" }
,"languages" :
[{"language": "en", "prompt": "Online Check-in URL"}]
}
]
}
]
,"componentServices" : [{"name" : "getFlightDepartureTime"
,"inputParams":[{"name" : "flightNo", "value": "{{flowScope.enterFlightNo}}"}]
,"outputParams": [{"name" : "departureTime","scope": "flow"}]
}
,{"name" : "getIsFlightDelayed"
,"inputParams":[{"name" : "flightNo", "value": "{{flowScope.enterFlightNo}}"}]
,"outputParams": [{"name" : "isDelayed","scope": "request"}]
}
]
}
Regarding the Flow, a multiple approach can be used, rather than writing a huge JSON document :
- Use Oracle Policy Automation to write the rules and state transitions
- Use Oracle BPM to define human taskflows
- Use a custom application where admin/business users can define the states and transitions, as well as pick up APIs from a catalog.
Here is a GIF of the running bot :
According to Oracle A Team, Oracle will soon release an intelligent bot cloud, which will be used then to replace the messaging platform server and chatbot engine.
This comment has been removed by the author.
ReplyDeleteWow Nice blog. It was really useful to create a messenger bot
ReplyDeleteKey Oracle Cloud Services for Chatbots
DeleteDeep Learning Projects for Final Year
Oracle Digital Assistant (ODA): A complete platform for building, deploying, and managing chatbots.
Oracle Cloud Infrastructure (OCI): Provides the underlying cloud infrastructure for hosting and scaling applications.
Deep Learning Final Year Projects
Oracle Integration Cloud: Facilitates integration with other Oracle and third-party applications.
Oracle Autonomous Database: For storing chatbot-related data securely and efficiently.
Oracle Analytics Cloud: For analyzing chatbot interactions and extracting insights.
Oracle Cloud Applications (SaaS): CRM, ERP, HCM, and other applications that can be integrated with chatbots.
Cloud Computing Projects For Final Year
Chatbot Development Services USA,
ReplyDeleteWeb Designing Services USA,
iPhone App Development Services USA,
Android App Development Services USA,
iOS App Development Services in USA,
What you have written in this post is exactly what I have experience when I first started my blog.I’m happy that I came across with your site this article is on point,thanks again and have a great day.Keep update more information.
ReplyDeleteChatbot Company in India
Chatbot Company in Chennai
Chatbot Development Company in Chennai
Chatbot in Chennai
Chatbot Development Company in India
This is excellent details about chatbot. Great article
ReplyDeleteChatbot Services
voice chatbot
Chatbot Companies
Best AI Chatbot
Thanks for sharing very interesting post, I appreciate to blogger for amazing post.
ReplyDeleteMobile App Development Company in USA
We have to thank and share such a nice blog post and interesting information. It is helpful for develop my knowledge, people always searching for this type of posts.
ReplyDeleteAI Chatbot
Chatbot Development
RPA Bot
Artificial Intelligence Company in Dubai
Nowadays, the internet has made it a lot easier to learn from the comfort of home. cursos de ti
ReplyDeleteI think great site for these post and i am read the most of contents have useful for my Carrier.Thanks for these useful information.Any information are commands like to share him.
ReplyDeleteChatbot Company in Dubai
Chatbot Companies in Dubai
Chatbot Development
AI Chatbot Development
Chatbot Companies in UAE
Chatbot Company in Chennai
Chatbot Company in Mumbai
Chatbot Company in Delhi
Chatbot Development Companies
Claribot is an latest invention of Chatbot Development Company in Indiapowered by Claritaz, which is an answer-database enabled chatbot that helps in resolving customer-queries in a conversational fashion, incorporating keyword-based and semantic search.
ReplyDeleteHello everyone!
ReplyDeleteDo you want to know how much chatbot development cost to get exceptional customer chatbot service to bring your business online. QSS Technosoft has well described about the estimation cost to develop chatbot solution.
Some really great tips here. Thanks for the post!best cloud server solutions in USA
ReplyDeleteIf you are a youtuber, then know 100k Subscribers on YouTube Salary Per Month | With Full Report?
ReplyDeleteI feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Same as your blog i found another one Oracle BPM .Actually I was looking for the same information on internet for Oracle BPM and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.
ReplyDeleteWe are Chatbot Development Company in India Build your bot with Leading Chatbot Development Company in India which helps to develop real time Customer support chatbot
ReplyDeleteWant to do a No.1 Data Science Course in Chennai with a Certification Exam? Catch the best features of Data Science training courses with Infycle Technologies, the best Data Science Training & Placement institutes in and around Chennai. Infycle offers the best hands-on training to the students with the revised curriculum to enhance their knowledge. In addition to the Certification & Training, Infycle offers placement classes for personality tests, interview preparation, and mock interviews for clearing the interviews with the best records. To have all it in your hands, dial 7504633633 for a free demo from the experts.
ReplyDeleteSome may stag in Interviews!!! OOPS!! More than 50% of students do this in their career. Instead, do Hadoop Training in Chennai at Infycle. Those students can easily clear this Interview session because more than 5 times at INFYCLE practicing mock-interview sessions, Hence students are Getting out of their interview fear.
ReplyDeleteIt was great to read your blog.
ReplyDeleteautomation of warehouse
Blog was amazing and worth a while.
ReplyDeletefacebook messenger chatbot
ai chatbot
ReplyDelete"Thank you for sharing this information related to Chatbot"
chatbot
Great post! About the sinch chatlayer. Thanks for sharing these valuable insights! Explore our similar services at https://www.sinch.com/en-in/products/customer-engagement/chatlayer/
ReplyDeleteGreat article! It’s exciting to see the advancements in AI and how Australian companies are leading the charge in this field. The Australian AI Solutions Company is clearly at the forefront of innovation, providing cutting-edge solutions that cater to a variety of industries. Their expertise in harnessing AI to drive business efficiency and solve complex problems is impressive. It’s also encouraging to see a focus on ethical AI development and a commitment to delivering solutions that truly benefit users. Looking forward to seeing more success stories and breakthroughs from this dynamic company!
ReplyDeleteAustralian AI Solutions Company