- 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
dailyGoals
Number number of calories allowed per day for usercalories
Number 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.
user
Object current userfoodName
String? 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
sessionUserId
String id used to reference current session with usertext
String input text user is sendingcallback
Function function that handles error, or sends response back to user
handles bot response depending on intent name and if all requeired params are present
user
Object currently logged in userresponse
Object object received from dialog flowresponse.fulfillmentText
String default response sent from dialog flowresponse.allRequiredParamsPresent
Boolean true if all required params are present for fulfillmentresponse.intent
Object contains info about current intentresponse.parameters
Object contains parameters obtained through slot fillingresponse.outputContexts
Object contains parameters within contexts persisted throughout the conversation
Returns String response message to user
bot object client interacts with.
type
String identifies the bot service (Lex, Watson, or DialogFlow)
initiate
Function creates a new service instance, returns a session idmessage
Function sends a user input, callback returns a response to userhandleResponse
Function 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
sessionUserId
String id used to reference current session with usertext
String input text user is sendingcallback
Function function that handles error, or sends response back to user
handles bot response depending on intent fulfillment
user
Object currently logged in useruser.id
String user id
response
Object object received from lexresponse.intentName
String identifies intent to be handledresponse.dialogState
String used to determine if intent is ready for fulfillmentresponse.sessionAttributes
Object attributes that can persist throughout a conversationresponse.sessionAttributes.foodName
String if defined, will be part of caloriesRemaining result string
response.slots
Object 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
callback
Function sends session id back to user
sends user input to Watson
sessionUserId
String id used to reference current session with usertext
String input text user is sendngcallback
Function function that handles error, or sends response back to user
handles bot response depending on action object
user
Object currently logged in useruser.id
String user id
response
Object object received from watson, contains action parameters needed to handle action
Returns String response message to user
calls external api to get nutrition info
query
String string created using buildFoodQuerysuccess
Function success handlerfailure
Function failure handler
Returns Object nutrition info object
handles slot filling and validations
request
Object lambda request objectsessionAttributes
Object attributes that persist throughout a sessioncurrentIntent
ObjectcurrentIntent.slots
Ojbect parameters used for fulfilling intent
inputTranscript
String user input string
Returns Object lambda response object
handles fulfillment by asking user to confirm log
request
Object lambda request object
Returns Object lambda response object
main queryFood intent handler
request
Objectrequest.invocationSource
String 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
query
String string created using buildFoodQuerysuccess
Function success handlerfailure
Function failure handler
Returns Object nutrition info object
handles slot filling and validations
request
Object lambda request objectsessionAttributes
Object attributes that persist throughout a sessioncurrentIntent
ObjectcurrentIntent.slots
Ojbect parameters used for fulfilling intent
inputTranscript
String user input string
Returns Object lambda response object
handles fulfillment by asking user to confirm log
request
Object lambda request object
Returns Object lambda response object
main queryFood intent handler
request
Objectrequest.invocationSource
String determines whether intent ready for fulfillment or not.
Returns Object lambda response object