Commit d522f27b authored by dasharatha.vamshi's avatar dasharatha.vamshi

initial push

parent ca6b0cc1
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.6 (rasa_x)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyChainedComparisonsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoreConstantInTheMiddle" value="true" />
</inspection_tool>
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="46">
<item index="0" class="java.lang.String" itemvalue="scikit-image" />
<item index="1" class="java.lang.String" itemvalue="scipy" />
<item index="2" class="java.lang.String" itemvalue="opencv-python" />
<item index="3" class="java.lang.String" itemvalue="torch" />
<item index="4" class="java.lang.String" itemvalue="torchvision" />
<item index="5" class="java.lang.String" itemvalue="absl-py" />
<item index="6" class="java.lang.String" itemvalue="protobuf" />
<item index="7" class="java.lang.String" itemvalue="rsa" />
<item index="8" class="java.lang.String" itemvalue="tensorflow-estimator" />
<item index="9" class="java.lang.String" itemvalue="opt-einsum" />
<item index="10" class="java.lang.String" itemvalue="python-dateutil" />
<item index="11" class="java.lang.String" itemvalue="cycler" />
<item index="12" class="java.lang.String" itemvalue="gast" />
<item index="13" class="java.lang.String" itemvalue="numpy" />
<item index="14" class="java.lang.String" itemvalue="pyasn1" />
<item index="15" class="java.lang.String" itemvalue="requests" />
<item index="16" class="java.lang.String" itemvalue="importlib-metadata" />
<item index="17" class="java.lang.String" itemvalue="pyasn1-modules" />
<item index="18" class="java.lang.String" itemvalue="requests-oauthlib" />
<item index="19" class="java.lang.String" itemvalue="tensorflow" />
<item index="20" class="java.lang.String" itemvalue="tensorboard-plugin-wit" />
<item index="21" class="java.lang.String" itemvalue="zipp" />
<item index="22" class="java.lang.String" itemvalue="oauthlib" />
<item index="23" class="java.lang.String" itemvalue="astunparse" />
<item index="24" class="java.lang.String" itemvalue="urllib3" />
<item index="25" class="java.lang.String" itemvalue="pyparsing" />
<item index="26" class="java.lang.String" itemvalue="Cython" />
<item index="27" class="java.lang.String" itemvalue="Markdown" />
<item index="28" class="java.lang.String" itemvalue="google-auth-oauthlib" />
<item index="29" class="java.lang.String" itemvalue="Werkzeug" />
<item index="30" class="java.lang.String" itemvalue="kiwisolver" />
<item index="31" class="java.lang.String" itemvalue="tqdm" />
<item index="32" class="java.lang.String" itemvalue="yolov5processor" />
<item index="33" class="java.lang.String" itemvalue="tensorboard" />
<item index="34" class="java.lang.String" itemvalue="future" />
<item index="35" class="java.lang.String" itemvalue="matplotlib" />
<item index="36" class="java.lang.String" itemvalue="cachetools" />
<item index="37" class="java.lang.String" itemvalue="grpcio" />
<item index="38" class="java.lang.String" itemvalue="Keras" />
<item index="39" class="java.lang.String" itemvalue="google-auth" />
<item index="40" class="java.lang.String" itemvalue="idna" />
<item index="41" class="java.lang.String" itemvalue="Pillow" />
<item index="42" class="java.lang.String" itemvalue="cython" />
<item index="43" class="java.lang.String" itemvalue="keras" />
<item index="44" class="java.lang.String" itemvalue="imgaug" />
<item index="45" class="java.lang.String" itemvalue="opencv-contrib-python" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N802" />
<option value="N806" />
<option value="N801" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="cv2.imresize" />
<option value="detectron2.model_zoo.get_config_file" />
<option value="detectron2.model_zoo.get_checkpoint_url" />
</list>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (rasa_x)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/KL-Bot.iml" filepath="$PROJECT_DIR$/.idea/KL-Bot.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="3ade1139-54f0-423a-8d8a-8e1d4fc91729" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="ProjectId" id="1mN8oBxoHGeinS2XvQH12xIGEhY" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../KL-bot-services" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\Admin\Desktop\Rasa" />
</key>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="3ade1139-54f0-423a-8d8a-8e1d4fc91729" name="Default Changelist" comment="" />
<created>1609322860467</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1609322860467</updated>
</task>
<servers />
</component>
<component name="WindowStateProjectService">
<state x="566" y="252" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1609739904059">
<screen x="0" y="0" width="1600" height="900" />
</state>
<state x="566" y="252" key="#com.intellij.fileTypes.FileTypeChooser/0.0.1600.900@0.0.1600.900" timestamp="1609739904059" />
<state x="580" y="205" key="FileChooserDialogImpl" timestamp="1610446271799">
<screen x="0" y="0" width="1600" height="900" />
</state>
<state x="580" y="205" key="FileChooserDialogImpl/0.0.1600.900@0.0.1600.900" timestamp="1610446271799" />
<state x="301" y="95" key="SettingsEditor" timestamp="1609833928728">
<screen x="0" y="0" width="1600" height="900" />
</state>
<state x="301" y="95" key="SettingsEditor/0.0.1600.900@0.0.1600.900" timestamp="1609833928728" />
</component>
</project>
\ No newline at end of file
FROM python:3.6-stretch
RUN pip install rasa rasa-sdk
ADD . /opt/code
WORKDIR /opt/code
CMD rasa run -m models --enable-api --cors "*"
\ No newline at end of file
# Rasa_CustomUI-v_2.0
A Chat widget easy to connect to RASA bot to Custom Channel(a webpage).
Added Support for
- Buttons
- Images
Command to start the bot:
> rasa run -m models --enable-api --cors "*" --debug
## Screenshots:
![ScreenShot](https://github.com/JiteshGaikwad/Rasa_CustomUI-v_2.0/blob/master/static/img/ui_1.PNG)
![ScreenShot](https://github.com/JiteshGaikwad/Rasa_CustomUI-v_2.0/blob/master/static/img/ui_2.PNG)
<!DOCTYPE html>
<html>
<head>
<title>ChatBot</title>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link rel="stylesheet" type="text/css" href="static/css/style.css">
<!--Main css-->
<link rel="stylesheet" type="text/css" href="static/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="container">
<div class="widget">
<div class="chat_header">
<!--Add the name of the bot here -->
<span style="color:white;margin-left: 5px;">KL Bot </span>
<!-- <span style="color:white;margin-right: 5px;float:right;margin-top: 5px;" id="close">
<i class="material-icons">close</i>
</span> -->
</div>
<!--Chatbot contents goes here -->
<div class="chats" id="chats">
<div class="clearfix"></div>
</div>
<!--user typing indicator -->
<div class="keypad">
<input type="text" id="keypad" class="usrInput browser-default" placeholder="Type a message..."
autocomplete="off">
</div>
</div>
<!--bot widget -->
<div class="profile_div" id="profile_div">
<img class="imgProfile" src="static/img/chat-bot.svg" />
</div>
<div class="profile_toggle" id="close">
<i class="material-icons bootToggle">keyboard_arrow_down</i>
</div>
</div>
<!--JavaScript at end of body for optimized loading-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="static/js/materialize.min.js"></script>
<!--Main Script -->
<script type="text/javascript" src="static/js/script.js"></script>
</body>
</html>
\ No newline at end of file
/*! Flickity v2.2.0
https://flickity.metafizzy.co
---------------------------------------------- */
.flickity-enabled{position:relative}.flickity-enabled:focus{outline:0}.flickity-viewport{overflow:hidden;position:relative;height:100%}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-button{position:absolute;background:hsla(0,0%,100%,.75);border:none;color:#333}.flickity-button:hover{background:#fff;cursor:pointer}.flickity-button:focus{outline:0;box-shadow:0 0 0 5px #19F}.flickity-button:active{opacity:.6}.flickity-button:disabled{opacity:.3;cursor:auto;pointer-events:none}.flickity-button-icon{fill:currentColor}.flickity-prev-next-button{top:50%;width:44px;height:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button .flickity-button-icon{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-page-dots{position:absolute;width:100%;bottom:-25px;padding:0;margin:0;list-style:none;text-align:center;line-height:1}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;background:#333;border-radius:50%;opacity:.25;cursor:pointer}.flickity-page-dots .dot.is-selected{opacity:1}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
.widget {
display: none;
width: 400px;
right: 15px;
height: 650px;
bottom: 9%;
position: fixed;
background: #f6f6f6;
border-radius: 10px 10px 10px 10px;
box-shadow: 0px 2px 10px 1px #b5b5b5;
}
.chat_header {
height: 7%;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
/* #6072e6 */
border-radius: 10px 10px 0px 0px;
padding: 5px;
font-size: 20px;
}
.chats {
height: 520px;
padding: 5px;
margin-top: 5px;
border-radius: 1px;
overflow-y: auto;
transition: 0.2s;
}
/* div.chats::-webkit-scrollbar {
width: 0px;
/* remove scrollbar space /
background: transparent;
/ optional: just make scrollbar invisible */
} */
/* Track */
div.chats::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px grey;
border-radius: 10px;
}
/* Handle */
div.chats::-webkit-scrollbar-thumb {
background: #c0bebe;
}
/* Handle on hover */
div.chats::-webkit-scrollbar-thumb:hover {
background: #918f8f;
}
#close {
cursor: pointer;
}
.clearfix {
margin-top: 2px;
margin-bottom: 2px;
}
.message {
margin-top: 5px;
margin-bottom: 5px;
margin-right: 0;
margin-left: 0;
}
.botAvatar {
/* border-radius: 50%; */
width: 1.5em;
height: 1.5em;
float: left;
margin-left: 5px;
/* border: 2px solid #6072e6; */
}
.botMsg {
float: left;
margin-top: 5px;
background: #ffffff;
box-shadow: 2px 5px 5px 1px #efeef5;
border: 1px solid #ffffff;
margin-left: 0.5em;
padding: 0.6em 1em;
border-radius: 1.5em;
max-width: 55%;
min-width: 25%;
font-size: 12px;
word-wrap: break-word;
}
.userMsg {
animation: animateElement linear 0.2s;
animation-iteration-count: 1;
margin-top: 5px;
word-wrap: break-word;
padding: 0.6em 1em;
float: right;
margin-right: 0.5em;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
border: 1px solid transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
color: #fff;
border-radius: 1.5em;
margin-bottom: 0.15em;
font-size: 12px;
max-width: 55%;
min-width: 25%;
line-height: 1.5em;
}
.userAvatar {
animation: animateElement linear 0.3s;
animation-iteration-count: 1;
border-radius: 50%;
width: 1.5em;
height: 1.5em;
float: right;
margin-right: 5px;
border: 2px solid #6072e6;
}
.singleCard {
/* height: 200px; */
padding-left: 10%;
padding-right: 10px;
}
.suggestions {
padding: 5px;
width: 100%;
/* border-radius: 10px;
background: #ffffff;
box-shadow: 2px 5px 5px 1px #dbdade; */
}
.cardsImage {
width: 100%;
height: 80%;
border-radius: 10px 10px 0px 0px;
}
.keypad {
height: 45px;
position: absolute;
bottom: 10px;
width: 320px;
}
.usrInput {
background: #f1f0f0;
padding: 0.5em;
width: 90%;
margin-left: 4%;
border-radius: 20px;
box-shadow: 0px 2px 10px 1px #b5b5b5;
border: 0;
padding-left: 15px;
height: 40px;
}
input:focus {
outline: none;
}
video:focus {
outline: none;
}
.menuTitle {
padding: 5px;
margin-top: 5px;
margin-bottom: 5px;
}
.menu {
padding: 5px;
}
.menuChips {
background: #85eb8aa3;
color: #188c33;
text-align: center;
padding: 8px;
border: #85eb8aa3;
margin: 5px;
cursor: pointer;
border-radius: 8px;
font-size: 14px;
word-wrap: break-word;
float: right;
}
.imgcard {
object-fit: cover;
width: 80%;
height: 90%;
border-radius: 10px 10px 10px 10px;
margin-left: 1%;
}
.chip {
background-color: #6072e6;
color: #fff;
font-weight: normal;
font-weight: 0;
text-align: center;
}
@keyframes animateElement {
0% {
opacity: 0;
transform: translate(0px, 10px);
}
100% {
opacity: 1;
transform: translate(0px, 0px);
}
}
.imgProfile {
box-shadow: 0 0px 1px 0 rgba(0, 0, 0, 0.16), 0 0px 10px 0 rgba(0, 0, 0, 0.12);
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
border-radius: 22px;
width: 60px;
padding: 10px;
}
.profile_div {
/* display: none; */
position: fixed;
padding: 5px;
width: 10%;
bottom: 0;
right: -65px;
cursor: pointer;
}
.profile_toggle{
display: none;
position: fixed;
padding: 5px;
width: 5%;
bottom: 0;
right: 0;
cursor: pointer;
}
.profileIcon {
height: 15%;
align-items: center;
float: left;
margin-right: 10px;
}
.bootToggle{
padding: 2px;
margin: 10px;
border-radius: 30px;
color: #ffffff;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
font-size: 35px !important;
}
::-webkit-scrollbar {
width: 8px;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px #605c5c;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: grey;
}
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42.18" viewBox="0 0 42 42.18">
<defs>
<style>
.cls-1 {
fill: #fff;
}
.cls-2 {
fill: none;
}
.cls-3 {
fill: #25d366;
}
</style>
</defs>
<g id="chat-bot" transform="translate(-0.332)">
<path id="Path_4" data-name="Path 4" class="cls-1" d="M18.865,35.363V32.33h14.27a2.416,2.416,0,0,0,1.836-.887A3.306,3.306,0,0,0,35.73,29.3V8.066a3.306,3.306,0,0,0-.759-2.146,2.416,2.416,0,0,0-1.836-.887H7.189a2.416,2.416,0,0,0-1.836.887,3.306,3.306,0,0,0-.759,2.146V29.3a3.306,3.306,0,0,0,.759,2.146,2.416,2.416,0,0,0,1.836.887H18.865v3.033H7.189C4.322,35.363,2,32.646,2,29.3V8.066C2,4.715,4.323,2,7.189,2H33.135C36,2,38.325,4.715,38.325,8.066V40.457c0,3.351-8.6-5.094-11.462-5.095h-8Z" transform="translate(0.595 -2)"/>
<rect id="_Transparent_Rectangle_" data-name="&lt;Transparent Rectangle&gt;" class="cls-2" width="42" height="42" transform="translate(0.332 0.18)"/>
<rect id="Rectangle_1" data-name="Rectangle 1" class="cls-1" width="32" height="29" rx="4" transform="translate(4.332 2.18)"/>
<path id="Path_1" data-name="Path 1" class="cls-3" d="M17.734,20.259A9.069,9.069,0,0,1,10.167,16.2l2.161-1.437a6.487,6.487,0,0,0,10.812,0L25.3,16.2a9.069,9.069,0,0,1-7.567,4.059Z" transform="translate(3.023 3.313)"/>
<path id="Path_2" data-name="Path 2" class="cls-3" d="M20.595,8a2.569,2.569,0,1,0,1.842.752A2.595,2.595,0,0,0,20.595,8Z" transform="translate(5.352 1.302)"/>
<path id="Path_3" data-name="Path 3" class="cls-3" d="M12.595,8a2.569,2.569,0,1,0,1.842.752A2.595,2.595,0,0,0,12.595,8Z" transform="translate(2.973 1.302)"/>
</g>
</svg>
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
// on input/text enter--------------------------------------------------------------------------------------
$('.usrInput').on('keyup keypress', function (e) {
var keyCode = e.keyCode || e.which;
var text = $(".usrInput").val();
if (keyCode === 13) {
if (text == "" || $.trim(text) == '') {
e.preventDefault();
return false;
} else {
$(".usrInput").blur();
setUserResponse(text);
send(text);
e.preventDefault();
return false;
}
}
});
//------------------------------------- Set user response------------------------------------
function setUserResponse(val) {
var UserResponse = '<p class="userMsg">' + val + ' </p><div class="clearfix"></div>';
$(UserResponse).appendTo('.chats').show('slow');
$(".usrInput").val('');
scrollToBottomOfResults();
$('.suggestions').remove();
}
//---------------------------------- Scroll to the bottom of the chats-------------------------------
function scrollToBottomOfResults() {
var terminalResultsDiv = document.getElementById('chats');
terminalResultsDiv.scrollTop = terminalResultsDiv.scrollHeight;
}
function e3() {
var h='0123456789abcdef';
var k='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
/* same as e4() below */
}
function e4() {
var h=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
var k=['x','x','x','x','x','x','x','x','-','x','x','x','x','-','4','x','x','x','-','y','x','x','x','-','x','x','x','x','x','x','x','x','x','x','x','x'];
var u='',i=0,rb=Math.random()*0xffffffff|0;
while(i++<36) {
var c=k[i-1],r=rb&0xf,v=c=='x'?r:(r&0x3|0x8);
u+=(c=='-'||c=='4')?c:h[v];rb=i%8==0?Math.random()*0xffffffff|0:rb>>4
}
return u
}
x = e4()
function send(message) {
console.log("User Message:", message)
$.ajax({
url: 'http://localhost:5005/webhooks/rest/webhook',
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
"message": message,
"sender": x
}),
success: function (data, textStatus) {
if(data != null){
setBotResponse(data);
}
console.log("Rasa Response: ", data, "\n Status:", textStatus)
},
error: function (errorMessage) {
setBotResponse("");
console.log('Error' + errorMessage);
}
});
}
send("Hi");
//------------------------------------ Set bot response -------------------------------------
function setBotResponse(val) {
setTimeout(function () {
if (val.length < 1) {
//if there is no response from Rasa
msg = 'I couldn\'t get that. Let\' try something else!';
var BotResponse = '<img class="botAvatar" src="./static/img/botAvatar_1.png"><p class="botMsg">' + msg + '</p><div class="clearfix"></div>';
$(BotResponse).appendTo('.chats').hide().fadeIn(1000);
} else {
//if we get response from Rasa
for (i = 0; i < val.length; i++) {
//check if there is text message
if (val[i].hasOwnProperty("text")) {
var BotResponse = '<img class="botAvatar" src="./static/img/botAvatar_1.png"><p class="botMsg">' + val[i].text + '</p><div class="clearfix"></div>';
$(BotResponse).appendTo('.chats').hide().fadeIn(1000);
}
//check if there is image
if (val[i].hasOwnProperty("image")) {
var BotResponse = '<div class="singleCard">' +
'<img class="imgcard" src="' + val[i].image + '">' +
'</div><div class="clearfix">'
$(BotResponse).appendTo('.chats').hide().fadeIn(1000);
}
//check if there is button message
if (val[i].hasOwnProperty("buttons")) {
addSuggestion(val[i].buttons);
}
}
scrollToBottomOfResults();
}
}, 500);
}
// ------------------------------------------ Toggle chatbot -----------------------------------------------
$('#profile_div').click(function () {
$('.profile_div').toggle();
$('.profile_toggle').toggle();
$('.widget').toggle();
scrollToBottomOfResults();
});
$('#close').click(function () {
$('.profile_div').toggle();
$('.profile_toggle').toggle();
$('.widget').toggle();
});
// ------------------------------------------ Suggestions -----------------------------------------------
function addSuggestion(textToAdd) {
setTimeout(function () {
var suggestions = textToAdd;
var suggLength = textToAdd.length;
$(' <div class="singleCard"> <div class="suggestions"><div class="menu"></div></div></diV>').appendTo('.chats').hide().fadeIn(1000);
// Loop through suggestions
for (i = 0; i < suggLength; i++) {
$('<button class="menuChips" data-payload=\''+(suggestions[i].payload)+'\'>' + suggestions[i].title + "</button>").appendTo(".menu");
}
scrollToBottomOfResults();
}, 1000);
}
// on click of suggestions, get the value and send to rasa
$(document).on("click", ".menu .menuChips", function () {
var text = this.innerText;
var payload= this.getAttribute('data-payload');
console.log("button payload: ",this.getAttribute('data-payload'))
setUserResponse(text);
send(payload);
$('.suggestions').remove(); //delete the suggestions
});
FROM python:3.6-stretch
RUN pip install rasa rasa-sdk
ADD . /opt/code
WORKDIR /opt/code
CMD rasa run actions
\ No newline at end of file
# Rasa_CustomUI-v_2.0
A Chat widget easy to connect to RASA bot to Custom Channel(a webpage).
Added Support for
- Buttons
- Images
Command to start the bot:
> rasa run -m models --enable-api --cors "*" --debug
## Screenshots:
![ScreenShot](https://github.com/JiteshGaikwad/Rasa_CustomUI-v_2.0/blob/master/static/img/ui_1.PNG)
![ScreenShot](https://github.com/JiteshGaikwad/Rasa_CustomUI-v_2.0/blob/master/static/img/ui_2.PNG)
<!DOCTYPE html>
<html>
<head>
<title>ChatBot</title>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link rel="stylesheet" type="text/css" href="static/css/style.css">
<!--Main css-->
<link rel="stylesheet" type="text/css" href="static/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="container">
<div class="widget">
<div class="chat_header">
<!--Add the name of the bot here -->
<span style="color:white;margin-left: 5px;">KL Bot </span>
<!-- <span style="color:white;margin-right: 5px;float:right;margin-top: 5px;" id="close">
<i class="material-icons">close</i>
</span> -->
</div>
<!--Chatbot contents goes here -->
<div class="chats" id="chats">
<div class="clearfix"></div>
</div>
<!--user typing indicator -->
<div class="keypad">
<input type="text" id="keypad" class="usrInput browser-default" placeholder="Type a message..."
autocomplete="off">
</div>
</div>
<!--bot widget -->
<div class="profile_div" id="profile_div">
<img class="imgProfile" src="static/img/chat-bot.svg" />
</div>
<div class="profile_toggle" id="close">
<i class="material-icons bootToggle">keyboard_arrow_down</i>
</div>
</div>
<!--JavaScript at end of body for optimized loading-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="static/js/materialize.min.js"></script>
<!--Main Script -->
<script type="text/javascript" src="static/js/script.js"></script>
</body>
</html>
\ No newline at end of file
/*! Flickity v2.2.0
https://flickity.metafizzy.co
---------------------------------------------- */
.flickity-enabled{position:relative}.flickity-enabled:focus{outline:0}.flickity-viewport{overflow:hidden;position:relative;height:100%}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-button{position:absolute;background:hsla(0,0%,100%,.75);border:none;color:#333}.flickity-button:hover{background:#fff;cursor:pointer}.flickity-button:focus{outline:0;box-shadow:0 0 0 5px #19F}.flickity-button:active{opacity:.6}.flickity-button:disabled{opacity:.3;cursor:auto;pointer-events:none}.flickity-button-icon{fill:currentColor}.flickity-prev-next-button{top:50%;width:44px;height:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button .flickity-button-icon{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-page-dots{position:absolute;width:100%;bottom:-25px;padding:0;margin:0;list-style:none;text-align:center;line-height:1}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;background:#333;border-radius:50%;opacity:.25;cursor:pointer}.flickity-page-dots .dot.is-selected{opacity:1}
This source diff could not be displayed because it is too large. You can view the blob instead.
.widget {
display: none;
width: 400px;
right: 15px;
height: 650px;
bottom: 9%;
position: fixed;
background: #f6f6f6;
border-radius: 10px 10px 10px 10px;
box-shadow: 0px 2px 10px 1px #b5b5b5;
}
.chat_header {
height: 7%;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
/* #6072e6 */
border-radius: 10px 10px 0px 0px;
padding: 5px;
font-size: 20px;
}
.chats {
height: 520px;
padding: 5px;
margin-top: 5px;
border-radius: 1px;
overflow-y: auto;
transition: 0.2s;
}
/* div.chats::-webkit-scrollbar {
width: 0px;
/* remove scrollbar space /
background: transparent;
/ optional: just make scrollbar invisible */
} */
/* Track */
div.chats::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px grey;
border-radius: 10px;
}
/* Handle */
div.chats::-webkit-scrollbar-thumb {
background: #c0bebe;
}
/* Handle on hover */
div.chats::-webkit-scrollbar-thumb:hover {
background: #918f8f;
}
#close {
cursor: pointer;
}
.clearfix {
margin-top: 2px;
margin-bottom: 2px;
}
.message {
margin-top: 5px;
margin-bottom: 5px;
margin-right: 0;
margin-left: 0;
}
.botAvatar {
/* border-radius: 50%; */
width: 1.5em;
height: 1.5em;
float: left;
margin-left: 5px;
/* border: 2px solid #6072e6; */
}
.botMsg {
float: left;
margin-top: 5px;
background: #ffffff;
box-shadow: 2px 5px 5px 1px #efeef5;
border: 1px solid #ffffff;
margin-left: 0.5em;
padding: 0.6em 1em;
border-radius: 1.5em;
max-width: 55%;
min-width: 25%;
font-size: 12px;
word-wrap: break-word;
}
.userMsg {
animation: animateElement linear 0.2s;
animation-iteration-count: 1;
margin-top: 5px;
word-wrap: break-word;
padding: 0.6em 1em;
float: right;
margin-right: 0.5em;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
border: 1px solid transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
color: #fff;
border-radius: 1.5em;
margin-bottom: 0.15em;
font-size: 12px;
max-width: 55%;
min-width: 25%;
line-height: 1.5em;
}
.userAvatar {
animation: animateElement linear 0.3s;
animation-iteration-count: 1;
border-radius: 50%;
width: 1.5em;
height: 1.5em;
float: right;
margin-right: 5px;
border: 2px solid #6072e6;
}
.singleCard {
/* height: 200px; */
padding-left: 10%;
padding-right: 10px;
}
.suggestions {
padding: 5px;
width: 100%;
/* border-radius: 10px;
background: #ffffff;
box-shadow: 2px 5px 5px 1px #dbdade; */
}
.cardsImage {
width: 100%;
height: 80%;
border-radius: 10px 10px 0px 0px;
}
.keypad {
height: 45px;
position: absolute;
bottom: 10px;
width: 320px;
}
.usrInput {
background: #f1f0f0;
padding: 0.5em;
width: 90%;
margin-left: 4%;
border-radius: 20px;
box-shadow: 0px 2px 10px 1px #b5b5b5;
border: 0;
padding-left: 15px;
height: 40px;
}
input:focus {
outline: none;
}
video:focus {
outline: none;
}
.menuTitle {
padding: 5px;
margin-top: 5px;
margin-bottom: 5px;
}
.menu {
padding: 5px;
}
.menuChips {
background: #85eb8aa3;
color: #188c33;
text-align: center;
padding: 8px;
border: #85eb8aa3;
margin: 5px;
cursor: pointer;
border-radius: 8px;
font-size: 14px;
word-wrap: break-word;
float: right;
}
.imgcard {
object-fit: cover;
width: 80%;
height: 90%;
border-radius: 10px 10px 10px 10px;
margin-left: 1%;
}
.chip {
background-color: #6072e6;
color: #fff;
font-weight: normal;
font-weight: 0;
text-align: center;
}
@keyframes animateElement {
0% {
opacity: 0;
transform: translate(0px, 10px);
}
100% {
opacity: 1;
transform: translate(0px, 0px);
}
}
.imgProfile {
box-shadow: 0 0px 1px 0 rgba(0, 0, 0, 0.16), 0 0px 10px 0 rgba(0, 0, 0, 0.12);
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
border-radius: 22px;
width: 60px;
padding: 10px;
}
.profile_div {
/* display: none; */
position: fixed;
padding: 5px;
width: 10%;
bottom: 0;
right: -65px;
cursor: pointer;
}
.profile_toggle{
display: none;
position: fixed;
padding: 5px;
width: 5%;
bottom: 0;
right: 0;
cursor: pointer;
}
.profileIcon {
height: 15%;
align-items: center;
float: left;
margin-right: 10px;
}
.bootToggle{
padding: 2px;
margin: 10px;
border-radius: 30px;
color: #ffffff;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
font-size: 35px !important;
}
::-webkit-scrollbar {
width: 8px;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px #605c5c;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: grey;
}
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42.18" viewBox="0 0 42 42.18">
<defs>
<style>
.cls-1 {
fill: #fff;
}
.cls-2 {
fill: none;
}
.cls-3 {
fill: #25d366;
}
</style>
</defs>
<g id="chat-bot" transform="translate(-0.332)">
<path id="Path_4" data-name="Path 4" class="cls-1" d="M18.865,35.363V32.33h14.27a2.416,2.416,0,0,0,1.836-.887A3.306,3.306,0,0,0,35.73,29.3V8.066a3.306,3.306,0,0,0-.759-2.146,2.416,2.416,0,0,0-1.836-.887H7.189a2.416,2.416,0,0,0-1.836.887,3.306,3.306,0,0,0-.759,2.146V29.3a3.306,3.306,0,0,0,.759,2.146,2.416,2.416,0,0,0,1.836.887H18.865v3.033H7.189C4.322,35.363,2,32.646,2,29.3V8.066C2,4.715,4.323,2,7.189,2H33.135C36,2,38.325,4.715,38.325,8.066V40.457c0,3.351-8.6-5.094-11.462-5.095h-8Z" transform="translate(0.595 -2)"/>
<rect id="_Transparent_Rectangle_" data-name="&lt;Transparent Rectangle&gt;" class="cls-2" width="42" height="42" transform="translate(0.332 0.18)"/>
<rect id="Rectangle_1" data-name="Rectangle 1" class="cls-1" width="32" height="29" rx="4" transform="translate(4.332 2.18)"/>
<path id="Path_1" data-name="Path 1" class="cls-3" d="M17.734,20.259A9.069,9.069,0,0,1,10.167,16.2l2.161-1.437a6.487,6.487,0,0,0,10.812,0L25.3,16.2a9.069,9.069,0,0,1-7.567,4.059Z" transform="translate(3.023 3.313)"/>
<path id="Path_2" data-name="Path 2" class="cls-3" d="M20.595,8a2.569,2.569,0,1,0,1.842.752A2.595,2.595,0,0,0,20.595,8Z" transform="translate(5.352 1.302)"/>
<path id="Path_3" data-name="Path 3" class="cls-3" d="M12.595,8a2.569,2.569,0,1,0,1.842.752A2.595,2.595,0,0,0,12.595,8Z" transform="translate(2.973 1.302)"/>
</g>
</svg>
This source diff could not be displayed because it is too large. You can view the blob instead.
// on input/text enter--------------------------------------------------------------------------------------
$('.usrInput').on('keyup keypress', function (e) {
var keyCode = e.keyCode || e.which;
var text = $(".usrInput").val();
if (keyCode === 13) {
if (text == "" || $.trim(text) == '') {
e.preventDefault();
return false;
} else {
$(".usrInput").blur();
setUserResponse(text);
send(text);
e.preventDefault();
return false;
}
}
});
//------------------------------------- Set user response------------------------------------
function setUserResponse(val) {
var UserResponse = '<p class="userMsg">' + val + ' </p><div class="clearfix"></div>';
$(UserResponse).appendTo('.chats').show('slow');
$(".usrInput").val('');
scrollToBottomOfResults();
$('.suggestions').remove();
}
//---------------------------------- Scroll to the bottom of the chats-------------------------------
function scrollToBottomOfResults() {
var terminalResultsDiv = document.getElementById('chats');
terminalResultsDiv.scrollTop = terminalResultsDiv.scrollHeight;
}
function e3() {
var h='0123456789abcdef';
var k='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
/* same as e4() below */
}
function e4() {
var h=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
var k=['x','x','x','x','x','x','x','x','-','x','x','x','x','-','4','x','x','x','-','y','x','x','x','-','x','x','x','x','x','x','x','x','x','x','x','x'];
var u='',i=0,rb=Math.random()*0xffffffff|0;
while(i++<36) {
var c=k[i-1],r=rb&0xf,v=c=='x'?r:(r&0x3|0x8);
u+=(c=='-'||c=='4')?c:h[v];rb=i%8==0?Math.random()*0xffffffff|0:rb>>4
}
return u
}
x = e4()
function send(message) {
console.log("User Message:", message)
$.ajax({
url: 'http://localhost:5005/webhooks/rest/webhook',
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
"message": message,
"sender": x
}),
success: function (data, textStatus) {
if(data != null){
setBotResponse(data);
}
console.log("Rasa Response: ", data, "\n Status:", textStatus)
},
error: function (errorMessage) {
setBotResponse("");
console.log('Error' + errorMessage);
}
});
}
send("Hi");
//------------------------------------ Set bot response -------------------------------------
function setBotResponse(val) {
setTimeout(function () {
if (val.length < 1) {
//if there is no response from Rasa
msg = 'I couldn\'t get that. Let\' try something else!';
var BotResponse = '<img class="botAvatar" src="./static/img/botAvatar_1.png"><p class="botMsg">' + msg + '</p><div class="clearfix"></div>';
$(BotResponse).appendTo('.chats').hide().fadeIn(1000);
} else {
//if we get response from Rasa
for (i = 0; i < val.length; i++) {
//check if there is text message
if (val[i].hasOwnProperty("text")) {
var BotResponse = '<img class="botAvatar" src="./static/img/botAvatar_1.png"><p class="botMsg">' + val[i].text + '</p><div class="clearfix"></div>';
$(BotResponse).appendTo('.chats').hide().fadeIn(1000);
}
//check if there is image
if (val[i].hasOwnProperty("image")) {
var BotResponse = '<div class="singleCard">' +
'<img class="imgcard" src="' + val[i].image + '">' +
'</div><div class="clearfix">'
$(BotResponse).appendTo('.chats').hide().fadeIn(1000);
}
//check if there is button message
if (val[i].hasOwnProperty("buttons")) {
addSuggestion(val[i].buttons);
}
}
scrollToBottomOfResults();
}
}, 500);
}
// ------------------------------------------ Toggle chatbot -----------------------------------------------
$('#profile_div').click(function () {
$('.profile_div').toggle();
$('.profile_toggle').toggle();
$('.widget').toggle();
scrollToBottomOfResults();
});
$('#close').click(function () {
$('.profile_div').toggle();
$('.profile_toggle').toggle();
$('.widget').toggle();
});
// ------------------------------------------ Suggestions -----------------------------------------------
function addSuggestion(textToAdd) {
setTimeout(function () {
var suggestions = textToAdd;
var suggLength = textToAdd.length;
$(' <div class="singleCard"> <div class="suggestions"><div class="menu"></div></div></diV>').appendTo('.chats').hide().fadeIn(1000);
// Loop through suggestions
for (i = 0; i < suggLength; i++) {
$('<button class="menuChips" data-payload=\''+(suggestions[i].payload)+'\'>' + suggestions[i].title + "</button>").appendTo(".menu");
}
scrollToBottomOfResults();
}, 1000);
}
// on click of suggestions, get the value and send to rasa
$(document).on("click", ".menu .menuChips", function () {
var text = this.innerText;
var payload= this.getAttribute('data-payload');
console.log("button payload: ",this.getAttribute('data-payload'))
setUserResponse(text);
send(payload);
$('.suggestions').remove(); //delete the suggestions
});
This diff is collapsed.
import ssl
import smtplib
from email import encoders
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
class SMTPUtility:
def __init__(self):
self.from_address = "dasharatha.vamshi@knowledgelens.com"
self.to_address = ["saivamshi2309@gmail.com", "saivamshi.s16@iiits.in"]
self.msg = MIMEMultipart()
self.msg['From'] = self.from_address
self.msg['To'] = " ,".join(self.to_address)
self.filename = ""
self.smtp_server = "smtp.gmail.com"
self.username = "dasharatha.vamshi@knowledgelens.com"
self.password = "Salla$230999"
self.smtp_server_port = 587
self.ssl = False
def send_email(self, content, attach=False):
try:
self.msg['Subject'] = "KL Bot: " + content['subject']
self.msg['body'] = content['body']
self.msg.attach(MIMEText(self.msg['body'], 'plain'))
# give filename in self.filename to attach a document.
if attach:
attachment = open(self.filename, "rb")
p = MIMEBase('application', 'octet-stream')
p.set_payload(attachment.read())
encoders.encode_base64(p)
p.add_header('Content-Disposition', "attachment; filename= %s" % self.filename)
self.msg.attach(p)
# starting the sever
if self.ssl:
context = ssl.create_default_context()
with smtplib.SMTP_SSL(self.smtp_server, self.smtp_server_port, context=context) as server:
server.login(self.username, self.password)
server.sendmail(self.from_address, self.to_address, self.msg.as_string())
else:
s = smtplib.SMTP(self.smtp_server, self.smtp_server_port)
s.starttls()
s.login(self.username, self.password)
s.sendmail(self.from_address, self.to_address, self.msg.as_string())
s.quit()
return True
except:
return False
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline:
# No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# If you'd like to customize it, uncomment and adjust the pipeline.
# See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 300
- name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
# No configuration for policies was provided. The following default policies were used to train your model.
# If you'd like to customize them, uncomment and adjust the policies.
# See https://rasa.com/docs/rasa/policies for more information.
- name: MemoizationPolicy
- name: TEDPolicy
max_history: 5
epochs: 300
- name: RulePolicy
- name: MappingPolicy
- name: FormPolicy
# This file contains the credentials for the voice & chat platforms
# which your bot is using.
# https://rasa.com/docs/rasa/messaging-and-voice-channels
rest:
# # you don't need to provide anything here - this channel doesn't
# # require any credentials
#facebook:
# verify: "<verify>"
# secret: "<your secret>"
# page-access-token: "<your page access token>"
#slack:
# slack_token: "<your slack token>"
# slack_channel: "<the slack channel>"
# slack_signing_secret: "<your slack signing secret>"
#socketio:
# user_message_evt: <event name for user message>
# bot_message_evt: <event name for bot messages>
# session_persistence: <true/false>
#mattermost:
# url: "https://<mattermost instance>/api/v4"
# token: "<bot token>"
# webhook_url: "<callback URL>"
# This entry is needed if you are using Rasa X. The entry represents credentials
# for the Rasa X "channel", i.e. Talk to your bot and Share with guest testers.
rasa:
url: "http://localhost:5002/api"
version: "2.0"
nlu:
- intent: greet
examples: |
- hey
- hello
- hi
- hello there
- good morning
- good evening
- moin
- hey there
- let's go
- hey dude
- goodmorning
- goodevening
- good afternoon
- Hi
- intent: goodbye
examples: |
- good afternoon
- cu
- good by
- cee you later
- good night
- bye
- goodbye
- have a nice day
- see you around
- bye bye
- see you later
- intent: affirm
examples: |
- yes
- y
- indeed
- of course
- that sounds good
- correct
- intent: deny
examples: |
- no
- n
- never
- I don't think so
- don't like that
- no way
- not really
- why should i give
- no i dont want to mention
- why do you need that
- no i dont provide
- why do you need this
- i wont
- wont
- intent: ask_id
examples: |
- tell me the id
- tell me the conversation id
- tell me the chat id
- tell me the session id
- what is my conversational id
- conversational id
- session id
- may i know my session id
- intent: mood_great
examples: |
- perfect
- great
- amazing
- feeling like a king
- wonderful
- I am feeling very good
- I am great
- I am amazing
- I am going to save the world
- super stoked
- extremely good
- so so perfect
- so good
- so perfect
- intent: mood_unhappy
examples: |
- my day was horrible
- I am sad
- I don't feel very well
- I am disappointed
- super sad
- I'm so sad
- sad
- very sad
- unhappy
- not good
- not very good
- extremly sad
- so saad
- so sad
- intent: bot_challenge
examples: |
- are you a bot?
- are you a human?
- am I talking to a bot?
- am I talking to a human?
- intent: glens
examples: |
- what is glens?
- tell me about glens?
- what is green lens?
- glens?
- glens
- intent: ilens
examples: |
- what is ilens?
- tell me about ilens?
- ilens?
- ilens
- intent: mlens
examples: |
- what is mlens?
- tell me about mlens?
- mlens?
- mlens
- intent: know_more
examples: |
- know more?
- I want to know more?
- tell me more?
- more?
- know more
- intent: name_entry
examples: |
- my name is [vamshi](name)
- [raju](name)
- [kevin](name) is my name
- my name is [tarun](name)
- [rajesh](name)
- my name is [mike](name)
- [stark](name)
- [vamshi](name)
- [shiva](name)
- [kiran](name)
- [yuvraj](name)
- [yuvaraj](name)
- intent: my_email
examples: |
- my email is [sai@gmail.com](email)
- [saivamshi@gmail.com](email)
- [r@gamil.com](email)
- my email is [d@gmail.com](email)
- [dash@knowledgelens.com](email)
- [saik@gmail.com](email)
- [yuv@gmail.com](email)
- intent: email_entry
examples: |
- [vamshi@knowledgelens.com](email) is my email
- my email id is [sai@knowledgelens.com](email)
- [v@yahoo.co.in](email)
- [sai@yahoo.co.in](email)
- [yuvraj.s@knowledgelens.com](email)
- intent: number_entry
examples: |
- my number is [1234567890](number)
- [1234567809](number)
- [1029384756](number) is my number
- my number is [1234509876](number)
- [1902873674](number)
- my number is [7687564789](number)
- [1076452288](number)
- [7799558890](number)
- intent: company_entry
examples: |
- i am from [google](company)
- [knowledgelens](company)
- [unemployed](company)
- [student](company)
- intent: query_entry
examples: |
- [what is glnes](query)
- [what is glnes](query)
- [what is glnes](query)
- [what is glnes](query)
- intent: request_demo
examples: |
- request demo
- can we have a demo
- can i get demo
- demo
- request_demo
- intent: request_call_back
examples: |
- call back
- can we have a call
- can you call back
- request_call_back
- intent: signup_for_email_newsletter
examples: |
- signup
- signup for email newsletter
- email signup
- newsletter signup
- signup_for_email_newsletter
- intent: send_us_a_query
examples: |
- i have a question
- i have a query
- can i get a answer for my question
- send a query
- intent: out_of_scope
examples: |
- I want to order food
- 2 + 2?
- us president?
version: "2.0"
rules:
- rule: Say goodbye anytime the user says goodbye
steps:
- intent: goodbye
- action: utter_goodbye
- rule: Say 'I am a bot' anytime the user challenges
steps:
- intent: bot_challenge
- action: utter_iamabot
- rule: Id asked
steps:
- intent: ask_id
- action: action_session_id
- rule: Demo form Activate
steps:
- intent: request_demo
- action: utter_request_demo
- action: user_details_form
- active_loop: user_details_form
- rule: Call back Form Activate
steps:
- intent: request_call_back
- action: utter_request_call_back
- action: call_form
- active_loop: call_form
- rule: Email signup Form Activate
steps:
- intent: signup_for_email_newsletter
- action: utter_signup_for_email_newsletter
- action: email_form
- active_loop: email_form
- rule: Query form Activate
steps:
- intent: send_us_a_query
- action: utter_send_us_a_query
- action: query_form
- active_loop: query_form
- rule: Submit form Demo
condition:
# Condition that form is active.
- active_loop: user_details_form
steps:
# Form is deactivated
- action: user_details_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: action_submit
- action: demo_slot_reset
- action: utter_show_options2
- rule: Submit form Email
condition:
# Condition that form is active.
- active_loop: email_form
steps:
# Form is deactivated
- action: email_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: email_submit
- action: utter_show_options2
- rule: Submit form Query
condition:
# Condition that form is active.
- active_loop: query_form
steps:
# Form is deactivated
- action: query_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: query_submit
- action: utter_show_options2
- rule: out_of_scope
steps:
- intent: nlu_feedback
- action: utter_out_of_scope
- rule: Submit form Call letter
condition:
# Condition that form is active.
- active_loop: call_form
steps:
# Form is deactivated
- action: call_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: call_submit
- action: utter_show_options2
- rule: out_of_scope
steps:
- intent: nlu_feedback
- action: utter_out_of_scope
\ No newline at end of file
version: "2.0"
stories:
- story: happy path
steps:
- intent: greet
- action: utter_show_options
- story: bye
steps:
- intent: deny
- action: utter_goodbye
- story: user details form stop
steps:
- intent: request_demo
- action: utter_request_demo
- action: user_details_form
- active_loop: user_details_form
- intent: deny
- action: utter_exit_form
- action: utter_show_options2
- action: action_deactivate_loop
- active_loop: null
- action: action_slot_reset
- story: query form stop
steps:
- intent: send_us_a_query
- action: utter_send_us_a_query
- action: query_form
- active_loop: query_form
- intent: deny
- action: utter_exit_form
- action: utter_show_options2
- action: action_deactivate_loop
- active_loop: null
- action: action_slot_reset
- story: email form stop
steps:
- intent: signup_for_email_newsletter
- action: utter_signup_for_email_newsletter
- action: email_form
- active_loop: email_form
- intent: deny
- action: utter_exit_form
- action: utter_show_options2
- action: action_deactivate_loop
- active_loop: null
- action: action_slot_reset
- story: call form stop
steps:
- intent: request_call_back
- action: utter_request_call_back
- action: call_form
- active_loop: call_form
- intent: deny
- action: utter_exit_form
- action: utter_show_options2
- action: action_deactivate_loop
- active_loop: null
- action: action_slot_reset
\ No newline at end of file
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: false
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- glens
- ilens
- mlens
- show_options
- know_more
- ask_id
- request_demo
- request_call_back
- signup_for_email_newsletter
- send_us_a_query
- out_of_scope
- name_entry:
use_entities:
- name
- email_entry:
use_entities:
- email
- number_entry:
use_entities:
- number
- company_entry:
use_entities:
- company
- query_entry:
use_entities:
- query
- nlu_feedback
entities:
- name
- email
- number
- company
- query
slots:
demo:
type: unfeaturized
influence_conversation: false
name:
type: unfeaturized
influence_conversation: false
email:
type: unfeaturized
influence_conversation: false
number:
type: unfeaturized
influence_conversation: false
company:
type: unfeaturized
influence_conversation: false
query:
type: unfeaturized
influence_conversation: false
requested_slot:
type: unfeaturized
influence_conversation: false
responses:
utter_exit_form:
- text: I am sorry, I could not process your request.
utter_request_demo:
- text: You have requested for a demo.
utter_request_call_back:
- text: You have requested for a call back.
utter_signup_for_email_newsletter:
- text: You have requested for email newsletter signup.
utter_send_us_a_query:
- text: You have requested to send us a query.
utter_greet:
- text: Hello there, Welcome to KL bot.
utter_enter:
- text: Please enter your details
utter_cheer_up:
- image: https://i.imgur.com/nGF1K8f.jpg
text: 'Here is something to cheer you up:'
utter_did_that_help:
- text: Did that help you?
utter_happy:
- text: Great, carry on!
utter_goodbye:
- text: Thank you. Have a great day!
utter_iamabot:
- text: I am a bot, powered by Rasa.
utter_glens:
- text: GLens is Real-Time Data Acquisition, Monitoring and Analytics suite of Products
for Industrial Emissions, Effluent Discharges and Ambient Air Monitoring. GLens
DAS Software, GLens Server Platform, GLens Environ Data Logger provides a comprehensive
solution for all Industry Environmental needs.
utter_ilens:
- text: Intelligent IoT Solutions, built for Industry 4.0
utter_mlens:
- text: MLens is a one-stop solution for all your Big Data needs, from Automated
Disaster Recovery to Compute Workload Migration, and everything in between.
utter_show_options:
- buttons:
- payload: request_demo
title: Request a Demo
- payload: request_call_back
title: Request Call Back
- payload: signup_for_email_newsletter
title: Signup for our Montly Newsletter
- payload: send_us_a_query
title: Send us a query
text: Hello there! How may I assist you today?
utter_show_options2:
- buttons:
- payload: request_demo
title: Request Demo
- payload: request_call_back
title: Request Call Back
- payload: signup_for_email_newsletter
title: Signup for email newsletter
- payload: send_us_a_query
title: Send us a query
text: Is there anything else we can help you with?
utter_know_more:
- text: Please enter your email id for contacting you
utter_ask_name:
- text: Please enter your name to proceed.
utter_ask_email:
- text: Please enter your email id.
utter_ask_number:
- text: Please enter your mobile number.
utter_ask_company:
- text: Please enter your company name.
utter_thanks:
- text: Thanks for providing the values.
utter_ask_query:
- text: Please tell us your query.
utter_details_thanks:
- text: "Thanks for providing the details \n email: {email} \n name: {name} \n mobile:\
\ {number} \n company: {company}"
utter_out_of_scope:
- text: Sorry, I did'nt get what you said. Please rephrase what you said.
utter_ask_demo:
- buttons:
- payload: glens
title: "GLens"
- payload: ilens
title: "ILens"
- payload: mlens
title: "MLens"
text: Please select the product that you would like to schedule a demo for.
actions:
- action_submit
- email_submit
- query_submit
- call_submit
- action_slot_reset
- action_session_id
- validate_email_form
- validate_call_form
- validate_query_form
- validate_user_details_form
- demo_slot_reset
forms:
user_details_form:
demo:
- entity: None
type: from_text
not_intent: deny
name:
- entity: None
type: from_text
not_intent: deny
email:
- entity: None
type: from_text
not_intent: deny
number:
- entity: None
type: from_text
not_intent: deny
company:
- entity: None
type: from_text
not_intent: deny
call_form:
name:
- entity: None
type: from_text
not_intent: deny
email:
- entity: None
type: from_text
not_intent: deny
number:
- entity: None
type: from_text
not_intent: deny
company:
- entity: None
type: from_text
not_intent: deny
email_form:
email:
- entity: None
type: from_text
not_intent: deny
query_form:
name:
- entity: None
type: from_text
not_intent: deny
email:
- entity: None
type: from_text
not_intent: deny
number:
- entity: None
type: from_text
not_intent: deny
company:
- entity: None
type: from_text
not_intent: deny
query:
- entity: None
type: from_text
not_intent: deny
\ No newline at end of file
# This file contains the different endpoints your bot can use.
# Server where the models are pulled from.
# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server
#models:
# url: http://my-server.com/models/default_core@latest
# wait_time_between_pulls: 10 # [optional](default: 100)
# Server which runs your custom actions.
# https://rasa.com/docs/rasa/custom-actions
action_endpoint:
url: "http://rasa-services:5055/webhook"
# Tracker store which is used to store pippithe conversations.
# By default the conversations are stored in memory.
# https://rasa.com/docs/rasa/tracker-stores
#tracker_store:
# type: redis
# url: <host of the redis instance, e.g. localhost>
# port: <port of your redis instance, usually 6379>
# db: <number of your database within redis, e.g. 0>
# password: <password used for authentication>
# use_ssl: <whether or not the communication is encrypted, default false>
#tracker_store:
# type: mongod
# url: <url to your mongo instance, e.g. mongodb://localhost:27017>
# db: <name of the db within your mongo instance, e.g. rasa>
# username: <username used for authentication>
# password: <password used for authentication>
# Event broker which all conversation events should be streamed to.
# https://rasa.com/docs/rasa/event-brokers
#event_broker:
# url: localhost
# username: username
# password: password
# queue: queue
#### This file contains tests to evaluate that your bot behaves as expected.
#### If you want to learn more, please see the docs: https://rasa.com/docs/rasa/testing-your-assistant
stories:
- story: happy path 1
steps:
- user: |
hello there!
intent: greet
- action: utter_greet
- user: |
amazing
intent: mood_great
- action: utter_happy
- story: happy path 2
steps:
- user: |
hello there!
intent: greet
- action: utter_greet
- user: |
amazing
intent: mood_great
- action: utter_happy
- user: |
bye-bye!
intent: goodbye
- action: utter_goodbye
- story: sad path 1
steps:
- user: |
hello
intent: greet
- action: utter_greet
- user: |
not good
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
yes
intent: affirm
- action: utter_happy
- story: sad path 2
steps:
- user: |
hello
intent: greet
- action: utter_greet
- user: |
not good
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
not really
intent: deny
- action: utter_goodbye
- story: sad path 3
steps:
- user: |
hi
intent: greet
- action: utter_greet
- user: |
very terrible
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
no
intent: deny
- action: utter_goodbye
- story: say goodbye
steps:
- user: |
bye-bye!
intent: goodbye
- action: utter_goodbye
- story: bot challenge
steps:
- user: |
are you a bot?
intent: bot_challenge
- action: utter_iamabot
This diff is collapsed.
import ssl
import smtplib
from email import encoders
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
class SMTPUtility:
def __init__(self):
self.from_address = "dasharatha.vamshi@knowledgelens.com"
self.to_address = ["saivamshi2309@gmail.com", "saivamshi.s16@iiits.in"]
self.msg = MIMEMultipart()
self.msg['From'] = self.from_address
self.msg['To'] = " ,".join(self.to_address)
self.filename = ""
self.smtp_server = "smtp.gmail.com"
self.username = "dasharatha.vamshi@knowledgelens.com"
self.password = "Salla$230999"
self.smtp_server_port = 587
self.ssl = False
def send_email(self, content, attach=False):
try:
self.msg['Subject'] = "KL Bot: " + content['subject']
self.msg['body'] = content['body']
self.msg.attach(MIMEText(self.msg['body'], 'plain'))
# give filename in self.filename to attach a document.
if attach:
attachment = open(self.filename, "rb")
p = MIMEBase('application', 'octet-stream')
p.set_payload(attachment.read())
encoders.encode_base64(p)
p.add_header('Content-Disposition', "attachment; filename= %s" % self.filename)
self.msg.attach(p)
# starting the sever
if self.ssl:
context = ssl.create_default_context()
with smtplib.SMTP_SSL(self.smtp_server, self.smtp_server_port, context=context) as server:
server.login(self.username, self.password)
server.sendmail(self.from_address, self.to_address, self.msg.as_string())
else:
s = smtplib.SMTP(self.smtp_server, self.smtp_server_port)
s.starttls()
s.login(self.username, self.password)
s.sendmail(self.from_address, self.to_address, self.msg.as_string())
s.quit()
return True
except:
return False
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline:
# No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# If you'd like to customize it, uncomment and adjust the pipeline.
# See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 300
- name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
# No configuration for policies was provided. The following default policies were used to train your model.
# If you'd like to customize them, uncomment and adjust the policies.
# See https://rasa.com/docs/rasa/policies for more information.
- name: MemoizationPolicy
- name: TEDPolicy
max_history: 5
epochs: 300
- name: RulePolicy
- name: MappingPolicy
- name: FormPolicy
# This file contains the credentials for the voice & chat platforms
# which your bot is using.
# https://rasa.com/docs/rasa/messaging-and-voice-channels
rest:
# # you don't need to provide anything here - this channel doesn't
# # require any credentials
#facebook:
# verify: "<verify>"
# secret: "<your secret>"
# page-access-token: "<your page access token>"
#slack:
# slack_token: "<your slack token>"
# slack_channel: "<the slack channel>"
# slack_signing_secret: "<your slack signing secret>"
#socketio:
# user_message_evt: <event name for user message>
# bot_message_evt: <event name for bot messages>
# session_persistence: <true/false>
#mattermost:
# url: "https://<mattermost instance>/api/v4"
# token: "<bot token>"
# webhook_url: "<callback URL>"
# This entry is needed if you are using Rasa X. The entry represents credentials
# for the Rasa X "channel", i.e. Talk to your bot and Share with guest testers.
rasa:
url: "http://localhost:5002/api"
version: "2.0"
nlu:
- intent: greet
examples: |
- hey
- hello
- hi
- hello there
- good morning
- good evening
- moin
- hey there
- let's go
- hey dude
- goodmorning
- goodevening
- good afternoon
- Hi
- intent: goodbye
examples: |
- good afternoon
- cu
- good by
- cee you later
- good night
- bye
- goodbye
- have a nice day
- see you around
- bye bye
- see you later
- intent: affirm
examples: |
- yes
- y
- indeed
- of course
- that sounds good
- correct
- intent: deny
examples: |
- no
- n
- never
- I don't think so
- don't like that
- no way
- not really
- why should i give
- no i dont want to mention
- why do you need that
- no i dont provide
- why do you need this
- i wont
- wont
- intent: ask_id
examples: |
- tell me the id
- tell me the conversation id
- tell me the chat id
- tell me the session id
- what is my conversational id
- conversational id
- session id
- may i know my session id
- intent: mood_great
examples: |
- perfect
- great
- amazing
- feeling like a king
- wonderful
- I am feeling very good
- I am great
- I am amazing
- I am going to save the world
- super stoked
- extremely good
- so so perfect
- so good
- so perfect
- intent: mood_unhappy
examples: |
- my day was horrible
- I am sad
- I don't feel very well
- I am disappointed
- super sad
- I'm so sad
- sad
- very sad
- unhappy
- not good
- not very good
- extremly sad
- so saad
- so sad
- intent: bot_challenge
examples: |
- are you a bot?
- are you a human?
- am I talking to a bot?
- am I talking to a human?
- intent: glens
examples: |
- what is glens?
- tell me about glens?
- what is green lens?
- glens?
- glens
- intent: ilens
examples: |
- what is ilens?
- tell me about ilens?
- ilens?
- ilens
- intent: mlens
examples: |
- what is mlens?
- tell me about mlens?
- mlens?
- mlens
- intent: know_more
examples: |
- know more?
- I want to know more?
- tell me more?
- more?
- know more
- intent: name_entry
examples: |
- my name is [vamshi](name)
- [raju](name)
- [kevin](name) is my name
- my name is [tarun](name)
- [rajesh](name)
- my name is [mike](name)
- [stark](name)
- [vamshi](name)
- [shiva](name)
- [kiran](name)
- [yuvraj](name)
- [yuvaraj](name)
- intent: my_email
examples: |
- my email is [sai@gmail.com](email)
- [saivamshi@gmail.com](email)
- [r@gamil.com](email)
- my email is [d@gmail.com](email)
- [dash@knowledgelens.com](email)
- [saik@gmail.com](email)
- [yuv@gmail.com](email)
- intent: email_entry
examples: |
- [vamshi@knowledgelens.com](email) is my email
- my email id is [sai@knowledgelens.com](email)
- [v@yahoo.co.in](email)
- [sai@yahoo.co.in](email)
- [yuvraj.s@knowledgelens.com](email)
- intent: number_entry
examples: |
- my number is [1234567890](number)
- [1234567809](number)
- [1029384756](number) is my number
- my number is [1234509876](number)
- [1902873674](number)
- my number is [7687564789](number)
- [1076452288](number)
- [7799558890](number)
- intent: company_entry
examples: |
- i am from [google](company)
- [knowledgelens](company)
- [unemployed](company)
- [student](company)
- intent: query_entry
examples: |
- [what is glnes](query)
- [what is glnes](query)
- [what is glnes](query)
- [what is glnes](query)
- intent: request_demo
examples: |
- request demo
- can we have a demo
- can i get demo
- demo
- request_demo
- intent: request_call_back
examples: |
- call back
- can we have a call
- can you call back
- request_call_back
- intent: signup_for_email_newsletter
examples: |
- signup
- signup for email newsletter
- email signup
- newsletter signup
- signup_for_email_newsletter
- intent: send_us_a_query
examples: |
- i have a question
- i have a query
- can i get a answer for my question
- send a query
- intent: out_of_scope
examples: |
- I want to order food
- 2 + 2?
- us president?
version: "2.0"
rules:
- rule: Say goodbye anytime the user says goodbye
steps:
- intent: goodbye
- action: utter_goodbye
- rule: Say 'I am a bot' anytime the user challenges
steps:
- intent: bot_challenge
- action: utter_iamabot
- rule: Id asked
steps:
- intent: ask_id
- action: action_session_id
- rule: Demo form Activate
steps:
- intent: request_demo
- action: utter_request_demo
- action: user_details_form
- active_loop: user_details_form
- rule: Call back Form Activate
steps:
- intent: request_call_back
- action: utter_request_call_back
- action: call_form
- active_loop: call_form
- rule: Email signup Form Activate
steps:
- intent: signup_for_email_newsletter
- action: utter_signup_for_email_newsletter
- action: email_form
- active_loop: email_form
- rule: Query form Activate
steps:
- intent: send_us_a_query
- action: utter_send_us_a_query
- action: query_form
- active_loop: query_form
- rule: Submit form Demo
condition:
# Condition that form is active.
- active_loop: user_details_form
steps:
# Form is deactivated
- action: user_details_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: action_submit
- action: demo_slot_reset
- action: utter_show_options2
- rule: Submit form Email
condition:
# Condition that form is active.
- active_loop: email_form
steps:
# Form is deactivated
- action: email_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: email_submit
- action: utter_show_options2
- rule: Submit form Query
condition:
# Condition that form is active.
- active_loop: query_form
steps:
# Form is deactivated
- action: query_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: query_submit
- action: utter_show_options2
- rule: out_of_scope
steps:
- intent: nlu_feedback
- action: utter_out_of_scope
- rule: Submit form Call letter
condition:
# Condition that form is active.
- active_loop: call_form
steps:
# Form is deactivated
- action: call_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: call_submit
- action: utter_show_options2
- rule: out_of_scope
steps:
- intent: nlu_feedback
- action: utter_out_of_scope
\ No newline at end of file
version: "2.0"
stories:
- story: happy path
steps:
- intent: greet
- action: utter_show_options
- story: bye
steps:
- intent: deny
- action: utter_goodbye
- story: user details form stop
steps:
- intent: request_demo
- action: utter_request_demo
- action: user_details_form
- active_loop: user_details_form
- intent: deny
- action: utter_exit_form
- action: utter_show_options2
- action: action_deactivate_loop
- active_loop: null
- action: action_slot_reset
- story: query form stop
steps:
- intent: send_us_a_query
- action: utter_send_us_a_query
- action: query_form
- active_loop: query_form
- intent: deny
- action: utter_exit_form
- action: utter_show_options2
- action: action_deactivate_loop
- active_loop: null
- action: action_slot_reset
- story: email form stop
steps:
- intent: signup_for_email_newsletter
- action: utter_signup_for_email_newsletter
- action: email_form
- active_loop: email_form
- intent: deny
- action: utter_exit_form
- action: utter_show_options2
- action: action_deactivate_loop
- active_loop: null
- action: action_slot_reset
- story: call form stop
steps:
- intent: request_call_back
- action: utter_request_call_back
- action: call_form
- active_loop: call_form
- intent: deny
- action: utter_exit_form
- action: utter_show_options2
- action: action_deactivate_loop
- active_loop: null
- action: action_slot_reset
\ No newline at end of file
version: '3'
services:
rasa-shell:
image: "rasa-shell:v1.0"
container_name: "rasa-shell"
ports:
- "5005:5005"
restart: always
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
action-server:
image: "rasa-actions:v1.0"
container_name: "action-server"
ports:
- "5055:5055"
restart: always
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
rasa-flask:
image: "rasa-flask:v1.0"
container_name: "rasa-flask"
restart: always
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
networks:
default:
external:
name: "rasa-services"
\ No newline at end of file
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: false
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- glens
- ilens
- mlens
- show_options
- know_more
- ask_id
- request_demo
- request_call_back
- signup_for_email_newsletter
- send_us_a_query
- out_of_scope
- name_entry:
use_entities:
- name
- email_entry:
use_entities:
- email
- number_entry:
use_entities:
- number
- company_entry:
use_entities:
- company
- query_entry:
use_entities:
- query
- nlu_feedback
entities:
- name
- email
- number
- company
- query
slots:
demo:
type: unfeaturized
influence_conversation: false
name:
type: unfeaturized
influence_conversation: false
email:
type: unfeaturized
influence_conversation: false
number:
type: unfeaturized
influence_conversation: false
company:
type: unfeaturized
influence_conversation: false
query:
type: unfeaturized
influence_conversation: false
requested_slot:
type: unfeaturized
influence_conversation: false
responses:
utter_exit_form:
- text: I am sorry, I could not process your request.
utter_request_demo:
- text: You have requested for a demo.
utter_request_call_back:
- text: You have requested for a call back.
utter_signup_for_email_newsletter:
- text: You have requested for email newsletter signup.
utter_send_us_a_query:
- text: You have requested to send us a query.
utter_greet:
- text: Hello there, Welcome to KL bot.
utter_enter:
- text: Please enter your details
utter_cheer_up:
- image: https://i.imgur.com/nGF1K8f.jpg
text: 'Here is something to cheer you up:'
utter_did_that_help:
- text: Did that help you?
utter_happy:
- text: Great, carry on!
utter_goodbye:
- text: Thank you. Have a great day!
utter_iamabot:
- text: I am a bot, powered by Rasa.
utter_glens:
- text: GLens is Real-Time Data Acquisition, Monitoring and Analytics suite of Products
for Industrial Emissions, Effluent Discharges and Ambient Air Monitoring. GLens
DAS Software, GLens Server Platform, GLens Environ Data Logger provides a comprehensive
solution for all Industry Environmental needs.
utter_ilens:
- text: Intelligent IoT Solutions, built for Industry 4.0
utter_mlens:
- text: MLens is a one-stop solution for all your Big Data needs, from Automated
Disaster Recovery to Compute Workload Migration, and everything in between.
utter_show_options:
- buttons:
- payload: request_demo
title: Request a Demo
- payload: request_call_back
title: Request Call Back
- payload: signup_for_email_newsletter
title: Signup for our Montly Newsletter
- payload: send_us_a_query
title: Send us a query
text: Hello there! How may I assist you today?
utter_show_options2:
- buttons:
- payload: request_demo
title: Request Demo
- payload: request_call_back
title: Request Call Back
- payload: signup_for_email_newsletter
title: Signup for email newsletter
- payload: send_us_a_query
title: Send us a query
text: Is there anything else we can help you with?
utter_know_more:
- text: Please enter your email id for contacting you
utter_ask_name:
- text: Please enter your name to proceed.
utter_ask_email:
- text: Please enter your email id.
utter_ask_number:
- text: Please enter your mobile number.
utter_ask_company:
- text: Please enter your company name.
utter_thanks:
- text: Thanks for providing the values.
utter_ask_query:
- text: Please tell us your query.
utter_details_thanks:
- text: "Thanks for providing the details \n email: {email} \n name: {name} \n mobile:\
\ {number} \n company: {company}"
utter_out_of_scope:
- text: Sorry, I did'nt get what you said. Please rephrase what you said.
utter_ask_demo:
- buttons:
- payload: glens
title: "GLens"
- payload: ilens
title: "ILens"
- payload: mlens
title: "MLens"
text: Please select the product that you would like to schedule a demo for.
actions:
- action_submit
- email_submit
- query_submit
- call_submit
- action_slot_reset
- action_session_id
- validate_email_form
- validate_call_form
- validate_query_form
- validate_user_details_form
- demo_slot_reset
forms:
user_details_form:
demo:
- entity: None
type: from_text
not_intent: deny
name:
- entity: None
type: from_text
not_intent: deny
email:
- entity: None
type: from_text
not_intent: deny
number:
- entity: None
type: from_text
not_intent: deny
company:
- entity: None
type: from_text
not_intent: deny
call_form:
name:
- entity: None
type: from_text
not_intent: deny
email:
- entity: None
type: from_text
not_intent: deny
number:
- entity: None
type: from_text
not_intent: deny
company:
- entity: None
type: from_text
not_intent: deny
email_form:
email:
- entity: None
type: from_text
not_intent: deny
query_form:
name:
- entity: None
type: from_text
not_intent: deny
email:
- entity: None
type: from_text
not_intent: deny
number:
- entity: None
type: from_text
not_intent: deny
company:
- entity: None
type: from_text
not_intent: deny
query:
- entity: None
type: from_text
not_intent: deny
\ No newline at end of file
# This file contains the different endpoints your bot can use.
# Server where the models are pulled from.
# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server
#models:
# url: http://my-server.com/models/default_core@latest
# wait_time_between_pulls: 10 # [optional](default: 100)
# Server which runs your custom actions.
# https://rasa.com/docs/rasa/custom-actions
action_endpoint:
url: "http://action-server:5055/webhook"
# Tracker store which is used to store pippithe conversations.
# By default the conversations are stored in memory.
# https://rasa.com/docs/rasa/tracker-stores
#tracker_store:
# type: redis
# url: <host of the redis instance, e.g. localhost>
# port: <port of your redis instance, usually 6379>
# db: <number of your database within redis, e.g. 0>
# password: <password used for authentication>
# use_ssl: <whether or not the communication is encrypted, default false>
#tracker_store:
# type: mongod
# url: <url to your mongo instance, e.g. mongodb://localhost:27017>
# db: <name of the db within your mongo instance, e.g. rasa>
# username: <username used for authentication>
# password: <password used for authentication>
# Event broker which all conversation events should be streamed to.
# https://rasa.com/docs/rasa/event-brokers
#event_broker:
# url: localhost
# username: username
# password: password
# queue: queue
#### This file contains tests to evaluate that your bot behaves as expected.
#### If you want to learn more, please see the docs: https://rasa.com/docs/rasa/testing-your-assistant
stories:
- story: happy path 1
steps:
- user: |
hello there!
intent: greet
- action: utter_greet
- user: |
amazing
intent: mood_great
- action: utter_happy
- story: happy path 2
steps:
- user: |
hello there!
intent: greet
- action: utter_greet
- user: |
amazing
intent: mood_great
- action: utter_happy
- user: |
bye-bye!
intent: goodbye
- action: utter_goodbye
- story: sad path 1
steps:
- user: |
hello
intent: greet
- action: utter_greet
- user: |
not good
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
yes
intent: affirm
- action: utter_happy
- story: sad path 2
steps:
- user: |
hello
intent: greet
- action: utter_greet
- user: |
not good
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
not really
intent: deny
- action: utter_goodbye
- story: sad path 3
steps:
- user: |
hi
intent: greet
- action: utter_greet
- user: |
very terrible
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
no
intent: deny
- action: utter_goodbye
- story: say goodbye
steps:
- user: |
bye-bye!
intent: goodbye
- action: utter_goodbye
- story: bot challenge
steps:
- user: |
are you a bot?
intent: bot_challenge
- action: utter_iamabot
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.6 (rasa_x)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyChainedComparisonsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoreConstantInTheMiddle" value="true" />
</inspection_tool>
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="46">
<item index="0" class="java.lang.String" itemvalue="scikit-image" />
<item index="1" class="java.lang.String" itemvalue="scipy" />
<item index="2" class="java.lang.String" itemvalue="opencv-python" />
<item index="3" class="java.lang.String" itemvalue="torch" />
<item index="4" class="java.lang.String" itemvalue="torchvision" />
<item index="5" class="java.lang.String" itemvalue="absl-py" />
<item index="6" class="java.lang.String" itemvalue="protobuf" />
<item index="7" class="java.lang.String" itemvalue="rsa" />
<item index="8" class="java.lang.String" itemvalue="tensorflow-estimator" />
<item index="9" class="java.lang.String" itemvalue="opt-einsum" />
<item index="10" class="java.lang.String" itemvalue="python-dateutil" />
<item index="11" class="java.lang.String" itemvalue="cycler" />
<item index="12" class="java.lang.String" itemvalue="gast" />
<item index="13" class="java.lang.String" itemvalue="numpy" />
<item index="14" class="java.lang.String" itemvalue="pyasn1" />
<item index="15" class="java.lang.String" itemvalue="requests" />
<item index="16" class="java.lang.String" itemvalue="importlib-metadata" />
<item index="17" class="java.lang.String" itemvalue="pyasn1-modules" />
<item index="18" class="java.lang.String" itemvalue="requests-oauthlib" />
<item index="19" class="java.lang.String" itemvalue="tensorflow" />
<item index="20" class="java.lang.String" itemvalue="tensorboard-plugin-wit" />
<item index="21" class="java.lang.String" itemvalue="zipp" />
<item index="22" class="java.lang.String" itemvalue="oauthlib" />
<item index="23" class="java.lang.String" itemvalue="astunparse" />
<item index="24" class="java.lang.String" itemvalue="urllib3" />
<item index="25" class="java.lang.String" itemvalue="pyparsing" />
<item index="26" class="java.lang.String" itemvalue="Cython" />
<item index="27" class="java.lang.String" itemvalue="Markdown" />
<item index="28" class="java.lang.String" itemvalue="google-auth-oauthlib" />
<item index="29" class="java.lang.String" itemvalue="Werkzeug" />
<item index="30" class="java.lang.String" itemvalue="kiwisolver" />
<item index="31" class="java.lang.String" itemvalue="tqdm" />
<item index="32" class="java.lang.String" itemvalue="yolov5processor" />
<item index="33" class="java.lang.String" itemvalue="tensorboard" />
<item index="34" class="java.lang.String" itemvalue="future" />
<item index="35" class="java.lang.String" itemvalue="matplotlib" />
<item index="36" class="java.lang.String" itemvalue="cachetools" />
<item index="37" class="java.lang.String" itemvalue="grpcio" />
<item index="38" class="java.lang.String" itemvalue="Keras" />
<item index="39" class="java.lang.String" itemvalue="google-auth" />
<item index="40" class="java.lang.String" itemvalue="idna" />
<item index="41" class="java.lang.String" itemvalue="Pillow" />
<item index="42" class="java.lang.String" itemvalue="cython" />
<item index="43" class="java.lang.String" itemvalue="keras" />
<item index="44" class="java.lang.String" itemvalue="imgaug" />
<item index="45" class="java.lang.String" itemvalue="opencv-contrib-python" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N802" />
<option value="N806" />
<option value="N801" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="cv2.imresize" />
<option value="detectron2.model_zoo.get_config_file" />
<option value="detectron2.model_zoo.get_checkpoint_url" />
</list>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (rasa_x)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/KL-Bot.iml" filepath="$PROJECT_DIR$/.idea/KL-Bot.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="3ade1139-54f0-423a-8d8a-8e1d4fc91729" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="ProjectId" id="1mN8oBxoHGeinS2XvQH12xIGEhY" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\Admin\Desktop\Rasa" />
</key>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="3ade1139-54f0-423a-8d8a-8e1d4fc91729" name="Default Changelist" comment="" />
<created>1609322860467</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1609322860467</updated>
</task>
<servers />
</component>
<component name="WindowStateProjectService">
<state x="566" y="252" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1609739904059">
<screen x="0" y="0" width="1600" height="900" />
</state>
<state x="566" y="252" key="#com.intellij.fileTypes.FileTypeChooser/0.0.1600.900@0.0.1600.900" timestamp="1609739904059" />
<state x="580" y="205" key="FileChooserDialogImpl" timestamp="1610446271799">
<screen x="0" y="0" width="1600" height="900" />
</state>
<state x="580" y="205" key="FileChooserDialogImpl/0.0.1600.900@0.0.1600.900" timestamp="1610446271799" />
<state x="301" y="95" key="SettingsEditor" timestamp="1609833928728">
<screen x="0" y="0" width="1600" height="900" />
</state>
<state x="301" y="95" key="SettingsEditor/0.0.1600.900@0.0.1600.900" timestamp="1609833928728" />
</component>
</project>
\ No newline at end of file
FROM python:3.6-stretch
RUN pip install rasa rasa-sdk
ADD . /opt/code
WORKDIR /opt/code
CMD rasa run -m models --enable-api --cors "*"
\ No newline at end of file
# Rasa_CustomUI-v_2.0
A Chat widget easy to connect to RASA bot to Custom Channel(a webpage).
Added Support for
- Buttons
- Images
Command to start the bot:
> rasa run -m models --enable-api --cors "*" --debug
## Screenshots:
![ScreenShot](https://github.com/JiteshGaikwad/Rasa_CustomUI-v_2.0/blob/master/static/img/ui_1.PNG)
![ScreenShot](https://github.com/JiteshGaikwad/Rasa_CustomUI-v_2.0/blob/master/static/img/ui_2.PNG)
<!DOCTYPE html>
<html>
<head>
<title>ChatBot</title>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link rel="stylesheet" type="text/css" href="static/css/style.css">
<!--Main css-->
<link rel="stylesheet" type="text/css" href="static/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="container">
<div class="widget">
<div class="chat_header">
<!--Add the name of the bot here -->
<span style="color:white;margin-left: 5px;">KL Bot </span>
<!-- <span style="color:white;margin-right: 5px;float:right;margin-top: 5px;" id="close">
<i class="material-icons">close</i>
</span> -->
</div>
<!--Chatbot contents goes here -->
<div class="chats" id="chats">
<div class="clearfix"></div>
</div>
<!--user typing indicator -->
<div class="keypad">
<input type="text" id="keypad" class="usrInput browser-default" placeholder="Type a message..."
autocomplete="off">
</div>
</div>
<!--bot widget -->
<div class="profile_div" id="profile_div">
<img class="imgProfile" src="static/img/chat-bot.svg" />
</div>
<div class="profile_toggle" id="close">
<i class="material-icons bootToggle">keyboard_arrow_down</i>
</div>
</div>
<!--JavaScript at end of body for optimized loading-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="static/js/materialize.min.js"></script>
<!--Main Script -->
<script type="text/javascript" src="static/js/script.js"></script>
</body>
</html>
\ No newline at end of file
/*! Flickity v2.2.0
https://flickity.metafizzy.co
---------------------------------------------- */
.flickity-enabled{position:relative}.flickity-enabled:focus{outline:0}.flickity-viewport{overflow:hidden;position:relative;height:100%}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-button{position:absolute;background:hsla(0,0%,100%,.75);border:none;color:#333}.flickity-button:hover{background:#fff;cursor:pointer}.flickity-button:focus{outline:0;box-shadow:0 0 0 5px #19F}.flickity-button:active{opacity:.6}.flickity-button:disabled{opacity:.3;cursor:auto;pointer-events:none}.flickity-button-icon{fill:currentColor}.flickity-prev-next-button{top:50%;width:44px;height:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button .flickity-button-icon{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-page-dots{position:absolute;width:100%;bottom:-25px;padding:0;margin:0;list-style:none;text-align:center;line-height:1}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;background:#333;border-radius:50%;opacity:.25;cursor:pointer}.flickity-page-dots .dot.is-selected{opacity:1}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
.widget {
display: none;
width: 400px;
right: 15px;
height: 650px;
bottom: 9%;
position: fixed;
background: #f6f6f6;
border-radius: 10px 10px 10px 10px;
box-shadow: 0px 2px 10px 1px #b5b5b5;
}
.chat_header {
height: 7%;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
/* #6072e6 */
border-radius: 10px 10px 0px 0px;
padding: 5px;
font-size: 20px;
}
.chats {
height: 520px;
padding: 5px;
margin-top: 5px;
border-radius: 1px;
overflow-y: auto;
transition: 0.2s;
}
/* div.chats::-webkit-scrollbar {
width: 0px;
/* remove scrollbar space /
background: transparent;
/ optional: just make scrollbar invisible */
} */
/* Track */
div.chats::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px grey;
border-radius: 10px;
}
/* Handle */
div.chats::-webkit-scrollbar-thumb {
background: #c0bebe;
}
/* Handle on hover */
div.chats::-webkit-scrollbar-thumb:hover {
background: #918f8f;
}
#close {
cursor: pointer;
}
.clearfix {
margin-top: 2px;
margin-bottom: 2px;
}
.message {
margin-top: 5px;
margin-bottom: 5px;
margin-right: 0;
margin-left: 0;
}
.botAvatar {
/* border-radius: 50%; */
width: 1.5em;
height: 1.5em;
float: left;
margin-left: 5px;
/* border: 2px solid #6072e6; */
}
.botMsg {
float: left;
margin-top: 5px;
background: #ffffff;
box-shadow: 2px 5px 5px 1px #efeef5;
border: 1px solid #ffffff;
margin-left: 0.5em;
padding: 0.6em 1em;
border-radius: 1.5em;
max-width: 55%;
min-width: 25%;
font-size: 12px;
word-wrap: break-word;
}
.userMsg {
animation: animateElement linear 0.2s;
animation-iteration-count: 1;
margin-top: 5px;
word-wrap: break-word;
padding: 0.6em 1em;
float: right;
margin-right: 0.5em;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
border: 1px solid transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
color: #fff;
border-radius: 1.5em;
margin-bottom: 0.15em;
font-size: 12px;
max-width: 55%;
min-width: 25%;
line-height: 1.5em;
}
.userAvatar {
animation: animateElement linear 0.3s;
animation-iteration-count: 1;
border-radius: 50%;
width: 1.5em;
height: 1.5em;
float: right;
margin-right: 5px;
border: 2px solid #6072e6;
}
.singleCard {
/* height: 200px; */
padding-left: 10%;
padding-right: 10px;
}
.suggestions {
padding: 5px;
width: 100%;
/* border-radius: 10px;
background: #ffffff;
box-shadow: 2px 5px 5px 1px #dbdade; */
}
.cardsImage {
width: 100%;
height: 80%;
border-radius: 10px 10px 0px 0px;
}
.keypad {
height: 45px;
position: absolute;
bottom: 10px;
width: 320px;
}
.usrInput {
background: #f1f0f0;
padding: 0.5em;
width: 90%;
margin-left: 4%;
border-radius: 20px;
box-shadow: 0px 2px 10px 1px #b5b5b5;
border: 0;
padding-left: 15px;
height: 40px;
}
input:focus {
outline: none;
}
video:focus {
outline: none;
}
.menuTitle {
padding: 5px;
margin-top: 5px;
margin-bottom: 5px;
}
.menu {
padding: 5px;
}
.menuChips {
background: #85eb8aa3;
color: #188c33;
text-align: center;
padding: 8px;
border: #85eb8aa3;
margin: 5px;
cursor: pointer;
border-radius: 8px;
font-size: 14px;
word-wrap: break-word;
float: right;
}
.imgcard {
object-fit: cover;
width: 80%;
height: 90%;
border-radius: 10px 10px 10px 10px;
margin-left: 1%;
}
.chip {
background-color: #6072e6;
color: #fff;
font-weight: normal;
font-weight: 0;
text-align: center;
}
@keyframes animateElement {
0% {
opacity: 0;
transform: translate(0px, 10px);
}
100% {
opacity: 1;
transform: translate(0px, 0px);
}
}
.imgProfile {
box-shadow: 0 0px 1px 0 rgba(0, 0, 0, 0.16), 0 0px 10px 0 rgba(0, 0, 0, 0.12);
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
border-radius: 22px;
width: 60px;
padding: 10px;
}
.profile_div {
/* display: none; */
position: fixed;
padding: 5px;
width: 10%;
bottom: 0;
right: -65px;
cursor: pointer;
}
.profile_toggle{
display: none;
position: fixed;
padding: 5px;
width: 5%;
bottom: 0;
right: 0;
cursor: pointer;
}
.profileIcon {
height: 15%;
align-items: center;
float: left;
margin-right: 10px;
}
.bootToggle{
padding: 2px;
margin: 10px;
border-radius: 30px;
color: #ffffff;
background: transparent linear-gradient(180deg, #69D135 0%, #1ECA5D 100%) 0% 0% no-repeat padding-box;;
font-size: 35px !important;
}
::-webkit-scrollbar {
width: 8px;
height: 10px;
}
/* Track */
::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px #605c5c;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: grey;
}
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42.18" viewBox="0 0 42 42.18">
<defs>
<style>
.cls-1 {
fill: #fff;
}
.cls-2 {
fill: none;
}
.cls-3 {
fill: #25d366;
}
</style>
</defs>
<g id="chat-bot" transform="translate(-0.332)">
<path id="Path_4" data-name="Path 4" class="cls-1" d="M18.865,35.363V32.33h14.27a2.416,2.416,0,0,0,1.836-.887A3.306,3.306,0,0,0,35.73,29.3V8.066a3.306,3.306,0,0,0-.759-2.146,2.416,2.416,0,0,0-1.836-.887H7.189a2.416,2.416,0,0,0-1.836.887,3.306,3.306,0,0,0-.759,2.146V29.3a3.306,3.306,0,0,0,.759,2.146,2.416,2.416,0,0,0,1.836.887H18.865v3.033H7.189C4.322,35.363,2,32.646,2,29.3V8.066C2,4.715,4.323,2,7.189,2H33.135C36,2,38.325,4.715,38.325,8.066V40.457c0,3.351-8.6-5.094-11.462-5.095h-8Z" transform="translate(0.595 -2)"/>
<rect id="_Transparent_Rectangle_" data-name="&lt;Transparent Rectangle&gt;" class="cls-2" width="42" height="42" transform="translate(0.332 0.18)"/>
<rect id="Rectangle_1" data-name="Rectangle 1" class="cls-1" width="32" height="29" rx="4" transform="translate(4.332 2.18)"/>
<path id="Path_1" data-name="Path 1" class="cls-3" d="M17.734,20.259A9.069,9.069,0,0,1,10.167,16.2l2.161-1.437a6.487,6.487,0,0,0,10.812,0L25.3,16.2a9.069,9.069,0,0,1-7.567,4.059Z" transform="translate(3.023 3.313)"/>
<path id="Path_2" data-name="Path 2" class="cls-3" d="M20.595,8a2.569,2.569,0,1,0,1.842.752A2.595,2.595,0,0,0,20.595,8Z" transform="translate(5.352 1.302)"/>
<path id="Path_3" data-name="Path 3" class="cls-3" d="M12.595,8a2.569,2.569,0,1,0,1.842.752A2.595,2.595,0,0,0,12.595,8Z" transform="translate(2.973 1.302)"/>
</g>
</svg>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment