Name: chat.susi.ai
Owner: FOSSASIA
Description: SUSI AI web client at https://chat.susi.ai/
Created: 2016-07-17 09:56:00.0
Updated: 2018-05-24 15:03:10.0
Pushed: 2018-05-24 16:32:05.0
Size: 260187
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Susi is an artificial intelligence system, combining pattern matching, internet data, data flow-, and inference engine principles. Through some abilities to reflect, it can remember the user input to produce deductions and personalized feedback. Its purpose is to explore the abilities of an artificial companion and to answer the remaining unanswered questions. The SUSI.AI web chat is a front-end developed for web access of SUSI.
Please join our mailing list to discuss questions regarding the project: https://groups.google.com/group/susiai/
Our chat channel is to be found on Gitter: https://gitter.im/fossasia/susi_webchat
`$ npm install
``$ npm run start
``$ npm run build
``$ npm run deploy
`Click this picture to see video about deploy!
`$ npm install -g surge
``$ npm install
`(if not already)`$ npm run build
``cd build
``surge
`Still having problems? Watch this video to clear your doubts How to setup SUSI web-chat with surge
Click Here to read the set up guide
Click this picture to see a video for deploying on Firebase
The SUSI WebChat uses Web Speech API for speech recognition and synthesis. To test whether your browser supports Text To Speech, open your browser console and run the following:
msg = new SpeechSynthesisUtterance('Hello World');
ow.speechSynthesis.speak(msg)
If you get speech output, then the Web API Speech Synthesis is supported by your browser and the text-to-speech features of SUSI Web Chat will work. The Web Speech API has support for all latest Chrome/-ium browsers as mentioned in the Web Speech API Mozilla docs. However there are a few bugs with some Chromium versions please check this link on how to fix them locally.
SUSI.AI can be used anomymously or as a logged in user by using the account features. The advantage logged in users is, that they the interaction history is synced across devices. More about accounting here.
Whenever a user logs in he must be able to view his chat history in the chat client. A user might also be using multiple chat clients, so the history across all platforms must be in sync.
A memory servlet is used to retrieve the user history.
api.susi.ai/susi/memory.json?access_token=ACCESS_TOKEN
When the client makes a call to the server to the above endpoint with the `ACCESS_TOKEN
` of the logged in user, the server returns a list of cognitions which contain susi responses to the queries in the history.
The response from the memory servlet is of the form:
"cognitions" : [],
"session" : {},
A sample susi response is of the form :
"query" :
"answers" : [ {
"data" : [],
"actions" : []
}],
So each cognition has `query
as well as ``
answer ``` and thus we get a conversation message pair in the chat history.
The cognitions contain a list of SUSI responses of the above form using which chat history is rendered.
All the user messages are stored in a log file. The memory servlet digs out the history of the required user from the log file. The log uses the identity of the user and accesses only that information which has been stored for the user. If the user is not logged on, no information is available. The conversation log is NOT stored for a particular IP. It?s stored for an Identity within the AAA system. That identity can be represented with an email address, or there can be others.
Thus the synchronization of history across all chat platforms is maintained.
After creation and a successful build, your project should have the following file structure:
.susi.ai/
ADME.md
de_modules/
ckage.json
blic/
index.html
c/
__tests__/
actions/
components/
constants/
dispatcher/
images/
stores/
utils/
App.test.js
ChatDataServer.js
history.js
index.css
index.js
setupTests.js
slintrc
ravis.yml
ploy.sh
CENSE
public/index.html
is the page template;src/index.js
is the JavaScript entry point.src/__tests__/
new tests related to all the components can be created in this folder, this project follows a jest
testing suite.src/actions/
contains related action types which can be defined in this folder.src/components/
any new component can be added in this folder, given that the file is reused or should be unique in some way. All static files are present in this component as well.src/components/Translate/
has all the pot files required to integrate the project with Weblate.src/constants/
contains all the action types which are being used in the Application.src/dispatcher/
contains the files to call the Dispatcher Service for the Chat App.src/images/
contains all the static images being used in the App.src/stores/
contains all application related stores for the Dispatcher Service which can be defined in this folder.src/utils/
contains all utilities are files which help us in communicating efficiently between the stores and the actions.src/App.test.js/
is the entry point for all tests in the __tests__
folder.src/ChatDataServer.js/
contains all the helper functions to the calls from the actions to the store.src/history.js/
registers a history for the react-router
service in the application.src/setupTests.js/
is the file containing custom scripts written for failing tests to pass due to the deprecated libraries..eslintrc
is the config file for the ESLint testing.deploy.sh
handles the continuous Travis Deployment of the project on gh-pages
..travis.yml
is the config file for Travis CI.Start new translation
and choose a new language for which you want to add translations.Note
Application Background Colour: #ffffff
Message History Background Colour: #f5f4f6
Chat Bubble Colour
#ffffff
#e0e0e0
Top Bar Colour: #4285f4
Buttons Colour: #4285f4
Search Result Colour: #ff5e00
Toggle Colour
#5ab1fc
#4285f4
User Feedback Colour
#1685e5
Unvoted: #90a4ae
#d1462f
Unvoted: #90a4ae
Fonts
#001d38
#001d38
Application Background Colour: #000000
Message History Background Colour: #183850
Chat Bubble Colour
#199393
#199393
Top Bar Colour: #000000
Buttons Colour: #000000
Search Result Colour: #ff5e00
Toggle Colour
#5ab1fc
#4285f4
User Feedback Colour
#00FF7F
Unvoted: #7eaaaf
#f23e3e
Unvoted: #7eaaaf
Fonts
#FFFFFF
#FFFFFF
This repository is under a GNU LESSER GENERAL PUBLIC LICENSE 2.1.