-
Notifications
You must be signed in to change notification settings - Fork 0
Bot service
The bot micro service implements the chat service communication and is used to analyze user messages, generate a GraphQL query as well as a response comprising information in a way that is understandable by the users.
The sequence diagram presents the sequence of operations that are performed by the bot service. Upon receipt of the input request, the module is responsible for converting the input user request that is later sent for analyzes to the NLU service. The results of the bot microservice are stored in Redis that is a server used as a distributed cache among all of the chatbot services. Using an ontology and based on the result of the NLU service, a GraphQL query is generated and is used for communication we provide to the supply chain service. The result of GraphQL is used by NLG (Natural Language Generation) engine to generate a suitable response to the user's query. The generated message is used to drive the NLU service forward.
- Greeting flow: this is the flow when the NLU service has determined the intention of greeting and as a result, the chatbot will return a predefined message to start the conversation.
- Goodbye flow: this is the flow when the NLU service has determined a goodbye intent and as a result chatbot will return a predefined message to end the conversation.
- Supply chain flows: this is the flow when the NLU service has determined a match of the user query to one of the predefined reference categories of the messages and as a result, the chat service will generate a GraphQL request to the supply chain service and generate a response for the respective order or delivery.
- Anything else flows: this is the flow when the NLU service can not determine the user's intention and as a result, a predefined message is returned to the user.