Skip to content

Commit

Permalink
fix: chat bot changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ameeshagireesh committed Nov 17, 2022
1 parent 800d6cf commit f07501d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 50 deletions.
2 changes: 1 addition & 1 deletion frontend/chat/chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</div>

<div class="msg-text">
yaba
...
</div>
</div>
</div>
Expand Down
69 changes: 20 additions & 49 deletions frontend/chat/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,33 @@ const BOT_NAME = "BOT";
const PERSON_NAME = "Customer";

const prompts = [
["hi", "hey", "hello", "good morning", "good afternoon"],
["how are you", "how is life", "how are things"],
// ["what are you doing", "what is going on", "what is up"],
// ["how old are you"],
// ["who are you", "are you human", "are you bot", "are you human or bot"],
// ["who created you", "who made you"],
// [
// "your name please",
// "your name",
// "may i know your name",
// "what is your name",
// "what call yourself"
// ],
// ["i love you"],
// ["happy", "good", "fun", "wonderful", "fantastic", "cool"],
// ["bad", "bored", "tired"],
// ["help me", "tell me story", "tell me joke"],
["what do you sell"],
["i want to buy"],
["scrunchies"],
["wallets"],
["jewellery"],
["clothes"],
["bath products"],
["desserts"],
["hi", "hey", "hello", "good morning", "good afternoon"], //0
["how are you", "how is life", "how are things"], //1
["what do you sell"], //2
["i want to buy"], //3
["scrunchies"], //4
["wallets"], //5
["jewellery"], //6
["clothes"], //7
["bath products"], //8
["desserts"], //9
]

const replies = [
["Hello!", "Hi!", "Hey!", "Hi there!", "Howdy"],
["Hello!", "Hi!", "Hey!", "Hi there!", "Howdy"], //0
[
"Fine... how are you?",
"Pretty well, how are you?",
"Fantastic, how are you?"
],
// [
// "Nothing much",
// "About to go to sleep",
// "Can you guess?",
// "I don't know actually"
// ],
// ["I am infinite"],
// ["I am just a bot", "I am a bot. What are you?"],
// ["The one true God, JavaScript"],
// ["I am nameless", "I don't have a name"],
// ["I love you too", "Me too"],
// ["Have you ever felt bad?", "Glad to hear it"],
// ["Why?", "Why? You shouldn't!", "Try watching TV"],
// ["What about?", "Once upon a time..."],
["Scrunchies, Desserts, Wallets, Jewellery, Clothes, Bath products"],
["what do you want to buy"],
["@handmadescrunchie_"],
["@haveitbagit", "@thetrendmakers", "@bombaythreads"],
["@cutiefy", "@unimaginableprices"],
["@femella", "@shopxanomaly", "@artisanluxe", "@rozedo_jaipur"],
["@soapaffairs", "@foamandfizzsoaps"],
["@thewhiskcorner", "@thechibicakeshop", "@sugarfanciesbypooja"],
], //1
["Scrunchies, Desserts, Wallets, Jewellery, Clothes, Bath products"], //2
["what do you want to buy"], //3
["@handmadescrunchie_"], //4
["@haveitbagit", "@thetrendmakers", "@bombaythreads"], //5
["@cutiefy", "@unimaginableprices"], //6
["@femella", "@shopxanomaly", "@artisanluxe", "@rozedo_jaipur"], //7
["@soapaffairs", "@foamandfizzsoaps"], //8
["@thewhiskcorner", "@thechibicakeshop", "@sugarfanciesbypooja"], //9
];

const alternative = [
Expand Down

0 comments on commit f07501d

Please sign in to comment.