- createdb fitbot
- npm install
- npm run seed
- add secret files to root project directory
- npm start
- npm run start-dev-dialog-flow
- npm run start-dev-lex
- createdb fitbot-test
- npm test
- npm run unit
- npm run unit-lex
- create a folder 'bin' in root directory
- download selenium-server-standalone-VERSION.jar and place in bin
- npm run start-dev-dialog-flow
- npm run end2end
- cd fitbot-angular
- ng serve
- checkout train-rasa
- cd fitbot-rasa
- make nlu-json
- make core-server
- make action-server
- npm run start-dev-lex
- npm run end2end
This project will serve as an introduction to the CBA practice at (Cedrus)[http://cedrus.digital]. As a member of the CBA team, you will be expected to be heavily involved with both automation (RPA) and machine learning (AI/ML).
This project is designed to provide experience working with multiple platforms for Chatbots (required is use of either Watson Assistant and Amazon Lex and a second of your choice).
The chatbot's purpose can be your choice but should be able to help a user solve some kind of problem and be capable of using an external API to get the user useful information.
A leisurely example might be a chatbot assist you in finding a TV show or Movie to watch. A more practical (preferred) example could be an internal app to help book a conference room at Galvanize. Both would require the date, time, number of users, and to incorporate with an external system.
- UI build in framework of your choosing
- Chat input with scrollable chat history
- Dynamic response nodes that may include:
- Customs styles
- External links
- Link Previews
- Generated Documenation using library of your choice
- Login with User Authentication
- Build chatbot using minimally 2 AI platforms (Watson Assistant and Amazon Lex)
- NodeJs Backend
- End to End and Unit testing
- Ability to select chatbot platform by app launch configuration
- Deployment procedure configurable by environment.
- Source Control w/ Git with appropriate branch management.
- Protection of assets (API keys and any proprietary info should not be committed)
- CI Deployment
- Additional Chatbot Platforms
- Containerization
The major technical concepts will cover:
- Feature-branch development with git
- Automated testing
- API
- Browser DOM, XPath, and CSS selectors
- Containers and VM's
Key software methodoloy concepts:
- Sprints and milestone tracking
- Kanban boards (feature development)
- Bug tracking / QA
- Sofware delivery and deployment
- Automatable and repeatable processes
- Create a source code repo using github, gitlab, or bitbucket
- Create a kanban board
- Create a project wiki (for Release Notes)
- Create your development environment
During this phase you should do some basic setup and configure you development environment, build process and automated testing process. Depending on your chosen framework some tooling may be be provided out of the box.
The first view should be a login page with a username an password field.
This is good time to verify that your end to end tests are working. You should have a test verifying the expected rendering of your login form.
You should also have a unit test verifying connectivity with one of the chat platforms
The details and suggestions for this project will grow and likely change but this is a good place to start
Use this file for the README.md in the project, placing whatever you think is important at the top of this file
- queryFood
- buildCaloriesStatus
- caloriesRemaining
- initiateDialogFlow
- messageDialogFlow
- handleResponseDialogFlow
- Bot
- initiateLex
- messageLex
- handleResponseLex
- saveFoodLog
- initiateWatson
- messageWatson
- handleResponseWatson
- getNutritionInfo
- handleDialogCodeHook
- handleFulfillmentCodeHook
- handleQueryFood
fulfillment handler for dialog flow
Creates a response depending on whether a user is over or under their caloric goal
dailyGoalsNumber number of calories allowed per day for usercaloriesNumber number of user's actual calories
Returns String conditional response string dependant on net calories
Gets user's foodlogs by today's date. Calculates net calories and returns a response message based on the result.
userObject current userfoodNameString? food name is included when this function is called immediately after logging an item.
Returns String resultant response to user
initiates the dialog flow bot
Returns String session id
sends user input to Dialog Flow
sessionUserIdString id used to reference current session with usertextString input text user is sendingcallbackFunction function that handles error, or sends response back to user
handles bot response depending on intent name and if all requeired params are present
userObject currently logged in userresponseObject object received from dialog flowresponse.fulfillmentTextString default response sent from dialog flowresponse.allRequiredParamsPresentBoolean true if all required params are present for fulfillmentresponse.intentObject contains info about current intentresponse.parametersObject contains parameters obtained through slot fillingresponse.outputContextsObject contains parameters within contexts persisted throughout the conversation
Returns String response message to user
bot object client interacts with.
typeString identifies the bot service (Lex, Watson, or DialogFlow)
initiateFunction creates a new service instance, returns a session idmessageFunction sends a user input, callback returns a response to userhandleResponseFunction handles intent fulfillment, this is called within the callback of this.message
initiates the lex service
Returns String session id
sends user input to Lex
sessionUserIdString id used to reference current session with usertextString input text user is sendingcallbackFunction function that handles error, or sends response back to user
handles bot response depending on intent fulfillment
userObject currently logged in useruser.idString user id
responseObject object received from lexresponse.intentNameString identifies intent to be handledresponse.dialogStateString used to determine if intent is ready for fulfillmentresponse.sessionAttributesObject attributes that can persist throughout a conversationresponse.sessionAttributes.foodNameString if defined, will be part of caloriesRemaining result string
response.slotsObject contains parameters needed to fulfill intent
Returns String response message to user
saves a food log to the database
Returns Object saved foodLog returned from database
initiates the watson service
callbackFunction sends session id back to user
sends user input to Watson
sessionUserIdString id used to reference current session with usertextString input text user is sendngcallbackFunction function that handles error, or sends response back to user
handles bot response depending on action object
userObject currently logged in useruser.idString user id
responseObject object received from watson, contains action parameters needed to handle action
Returns String response message to user
calls external api to get nutrition info
queryString string created using buildFoodQuerysuccessFunction success handlerfailureFunction failure handler
Returns Object nutrition info object
handles slot filling and validations
requestObject lambda request objectsessionAttributesObject attributes that persist throughout a sessioncurrentIntentObjectcurrentIntent.slotsOjbect parameters used for fulfilling intent
inputTranscriptString user input string
Returns Object lambda response object
handles fulfillment by asking user to confirm log
requestObject lambda request object
Returns Object lambda response object
main queryFood intent handler
requestObjectrequest.invocationSourceString determines whether intent ready for fulfillment or not.
Returns Object lambda response object
fulfillment handler for dialog flow
calls external api to get nutrition info
queryString string created using buildFoodQuerysuccessFunction success handlerfailureFunction failure handler
Returns Object nutrition info object
handles slot filling and validations
requestObject lambda request objectsessionAttributesObject attributes that persist throughout a sessioncurrentIntentObjectcurrentIntent.slotsOjbect parameters used for fulfilling intent
inputTranscriptString user input string
Returns Object lambda response object
handles fulfillment by asking user to confirm log
requestObject lambda request object
Returns Object lambda response object
main queryFood intent handler
requestObjectrequest.invocationSourceString determines whether intent ready for fulfillment or not.
Returns Object lambda response object